×

Notice

The forum is in read only mode.

Undefined var on job_filters.php

13 years 6 months ago #1504 by Bruce Springthorpe
Running Joomla 1.5.12 in Legacy 1.0 mode.

Getting the following error on page load:

Notice: Trying to get property of non-object in /home/gspringthorpe/HOAPULSE.COM/components/com_jsjobs/views/jobseeker/tmpl/job_filters.php on line 78

A little testing shows the undefined var is $this->userrole.

Error shows only when Global Configuration Error Reporting is set at Maximum.

Do I need to worry about this error?

Thanks!
13 years 5 months ago #1506 by Ahmad
Please edit job_filter.php

Add this code above line 78
if(isset($this->userrole))

Please write your valuable review JS Jobs and JS Support Ticket at JED.
13 years 5 months ago #1507 by Bruce Springthorpe
Is this how it should appear? (I'm assuming that you want the column but not the contents.)

Bruce

<td colspan="2" align="left">
<?php
// added 10-25-2010 per instructions from Joomshark.com
if(isset($this->userrole)) {
?>
<?php if (($this->uid) && ($this->userrole->rolefor)){ ?>
<?php if ($this->filterid) { ?>
<button class="button" onclick="deleteSearch();"><?php echo JText::_( 'JS_THIS_FILTER_DELETE' ); ?></button>
<?php } else { ?>
<button class="button" onclick="saveSearch();"><?php echo JText::_( 'JS_THIS_FILTER_SAVE' ); ?></button>
<?php } ?>
<?php } ?>
<?php
// added 10-25-2010 per instructions from Joomshark.com
}
?>
</td>
Time to create page: 0.060 seconds

Please publish modules in offcanvas position.