Disable depreciation error warnings in SMF

spiros

  • Administrator
  • Hero Member
  • *****
    • Posts: 812013
    • Gender:Male
  • point d’amour
Disable depreciation error warnings in SMF

Change index.php

Find
Code: [Select]
error_reporting(defined('E_STRICT') ? E_ALL | E_STRICT : E_ALL);
Replace
Code: [Select]
$reporting = E_ALL;
if (defined('E_STRICT'))
$reporting |= E_STRICT;
if (defined('E_DEPRECATED'))
$reporting &= ~E_DEPRECATED;
error_reporting($reporting);


Change Sources/Errors.php

Find
Code: [Select]
  // Ignore errors if we're ignoring them or they are strict notices from PHP 5 (which cannot be solved without breaking PHP 4.)
  if (error_reporting() == 0 || (defined('E_STRICT') && $error_level == E_STRICT && (empty($modSettings['enableErrorLogging']) || $modSettings['enableErrorLogging'] != 2)))
    return;
Replace
Code: [Select]
  // Ignore errors if we're ignoring them or they are strict notices from PHP 5 (which cannot be solved without breaking PHP 4.)
  if (error_reporting() == 0 || (defined('E_STRICT') && $error_level == E_STRICT && (empty($modSettings['enableErrorLogging']) || $modSettings['enableErrorLogging'] != 2)))
    return;
  // Disable PHP 5.5 "DEPRECATED"  errors from filling the forum error logs
  if (defined('E_DEPRECATED') && $error_level == E_DEPRECATED)
    return;
https://www.simplemachines.org/community/index.php?topic=506431.msg3594347#msg3594347

I had to edit my Apache httpd.conf file and set "LogLevel" to  "warn" and disable the forum error logs (Admin » Configuration » Security and Moderation » General)
https://www.simplemachines.org/community/index.php?topic=569552.msg4039532#msg4039532
« Last Edit: 14 Dec, 2019, 17:47:56 by spiros »


 

Search Tools