Blabberbox » 42 » SMF1 on PHP5Share on Twitter

SMF1 on PHP5

January 14th, 2020 | Posted by pftq in 42 | #
For those still using SMF1, PHP5 or later will throw a lot of deprecated errors and warnings, which quickly clog the error log.  This thread below isolates the 3 changes you need to clear them:
https://www.simplemachines.org/community/index.php?topic=534915.0

To stop error logging internally to SMF:
Quote
In index.php:
- Replace set_error_handler('error_handler'); with set_error_handler('error_handler',E_ALL & ~E_DEPRECATED & ~E_NOTICE);

To stop errors showing on the page itself:
Quote
In index.php:
- Change error_reporting(E_ALL); to error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE);

In SSI.php
Change
Code:
$ssi_error_reporting = error_reporting(E_ALL);
to
Code:
$ssi_error_reporting = error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE);
412 unique view(s)

Leave a Comment

Name: (Have an account? Login or Register)
Email: (Won't be published)
Website: (Optional)
Comment:
Enter the code from image: