|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-08-23 16:57 UTC] dave dot mulford at gmail dot com
Description: ------------ haru-1.0.0 on php-5.3.3 (not selectable in the version drop-down above), gives the compile warning: warning: 'php_set_error_handling' is deprecated (declared at /usr/lib64/php5/include/php/main/php.h:292) This occurs many times within different functions. Expected result: ---------------- No compiler warnings when compiling haru-1.0.0 as was the case with php-5.2 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 16:00:01 2025 UTC |
A patch for this is below. I did not see any way to upload a patch file. Sorry. ===== PATCH ===== --- haru-1.0.0/haru.c 2008-11-19 08:48:57.000000000 +0000 +++ haru.c 2010-08-25 12:10:26.000000000 +0000 @@ -116,26 +116,29 @@ #if PHP_MAJOR_VERSION < 6 #define HARU_CHECK_FILE(filename) \ do { \ - php_set_error_handling(EH_THROW, ce_haruexception TSRMLS_CC); \ + zend_error_handling error_handling; \ + zend_replace_error_handling(EH_THROW, ce_haruexception, &error_handling TSRMLS_CC); \ if (PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { \ - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); \ + zend_restore_error_handling(&error_handling TSRMLS_CC); \ return; \ } \ if (php_check_open_basedir(filename TSRMLS_CC)) { \ - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); \ + zend_restore_error_handling(&error_handling TSRMLS_CC); \ return; \ } \ - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); \ + zend_restore_error_handling(&error_handling TSRMLS_CC); \ } while(0) #else #define HARU_CHECK_FILE(filename) \ do { \ - php_set_error_handling(EH_THROW, ce_haruexception TSRMLS_CC); \ + zend_error_handling error_handling; \ + zend_replace_error_handling(EH_THROW, ce_haruexception, &error_handling TSRMLS_CC); \ if (php_check_open_basedir(filename TSRMLS_CC)) { \ - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); \ + zend_restore_error_handling(&error_handling TSRMLS_CC); \ return; \ } \ - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); \ + zend_restore_error_handling(&error_handling TSRMLS_CC); \ + } while(0) } while(0) #endif