Notifications
Clear all
6 Forums 829 Topics 3,280 Posts 10 Online 3,047 Members

Resolved After update to 102 my site changed to display-errors-mode

2 Posts
2 Users
0 Reactions
116 Views
Posts: 4
Topic starter
(@hobbelman)
Member
Joined: 7 years ago

Even while I have Show-php-errors in /scp/theme.php#theme-info my system still appears to show errors. I was able to fix this problem by changing at the end of main.inc.php :

if ( $custom["show-errors"] ) set_error_handler("error_handler");

should be:

if ( $custom["show-errors"] == "true") set_error_handler("error_handler");

Thanks,

Michiel Hobbelman


1 Reply
Posts: 1185
Admin
(@stevland)
Member
Joined: 10 years ago

Hi Michiel,

Thank you very much for taking the time to post this report and your solution.

Unfortunately, your fix didn't work on this end... perhaps there is something missing from your explaination.

But here is the solution that we came up with:

main.inc.php, line 74

change

ini_set('display_errors', $custom["show-errors"] ? 1 : 0 ); // Set by installer
ini_set('display_startup_errors', $custom["show-errors"] ? 1 : 0 ); // Set by installer
if ( $custom["show-errors"] ) set_error_handler("error_handler");
ie_check($custom);
?>

to

ini_set('display_errors', filter_var($custom["show-errors"] , FILTER_VALIDATE_BOOLEAN) ? 1 : 0 ); // Set by installer
ini_set('display_startup_errors',filter_var($custom["show-errors"] , FILTER_VALIDATE_BOOLEAN) ? 1 : 0 ); // Set by installer
if ( filter_var($custom["show-errors"] , FILTER_VALIDATE_BOOLEAN) ) set_error_handler("error_handler");
ie_check($custom);
?>

I'm going to release osTicket-1.14.3-Awesome-102a.zip in a few moments with this hotfix.


Reply
Share: