diff --git a/Changelog b/Changelog index 8558b2b2f..b93368674 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2015-10-15 DariusIII + Chg: Remove snHandleerror from SpotNab. Add: Example config file Fix: Change Misc to Utility Chg: Move patches to mysql subdir diff --git a/newznab/controllers/SpotNab.php b/newznab/controllers/SpotNab.php index c7e9fe860..cc02a2e3d 100644 --- a/newznab/controllers/SpotNab.php +++ b/newznab/controllers/SpotNab.php @@ -22,23 +22,6 @@ if(!defined('JSON_HEX_APOS')) define('JSON_HEX_APOS', 4); if(!defined('JSON_HEX_QUOT')) define('JSON_HEX_QUOT', 8); if(!defined('JSON_UNESCAPED_UNICODE')) define('JSON_UNESCAPED_UNICODE', 256); -// Silent Error Handler (used to shut up noisy XML exceptions) -// we use the silent error handler for remote connection failures as well -function snHandleError($errno, $errstr, $errfile, $errline, array $errcontext){ - if (0 === error_reporting()) - return false; - if(!defined('E_STRICT'))define('E_STRICT', 2048); - switch($errno){ - case E_WARNING: - case E_NOTICE: - case E_STRICT: - return; - default: - break; - }; - throw new \ErrorException($errstr, 0, $errno, $errfile, $errline); -} - // Create a NNTP \Exception type so we can identify it from others class SpotNabException extends \Exception { } @@ -391,9 +374,6 @@ class SpotNab { } } - // Now we fetch headers - set_error_handler('snHandleError'); - // Connect to server try{ if (($this->_pdo->getSetting('alternate_nntp') == 1 ? $this->_nntp->doConnect(true, true) : $this->_nntp->doConnect()) !== true) { @@ -734,7 +714,6 @@ class SpotNab { } // Now we fetch headers - set_error_handler('snHandleError'); // Connect to server try{ @@ -1817,8 +1796,6 @@ class SpotNab { $msg_id = $matches['id']; - set_error_handler('snHandleError'); - // Connect to server if (($this->_pdo->getSetting('alternate_nntp') == 1 ? $this->_nntp->doConnect(true, true) : $this->_nntp->doConnect()) !== true) { exit($this->_pdo->log->error("Unable to connect to usenet." . PHP_EOL));