|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-03-05 02:34 UTC] felipe@php.net
[2008-03-27 09:51 UTC] jani@php.net
[2008-04-04 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 05:00:02 2025 UTC |
Description: ------------ The following was found when I used the code of a phpt via apache-module php. Requesting the script below returns the requested output as specified in the phpt. However, second and third requests will result a different output with no error messages. As specified in the phpt --INI-- section, I added the following directives to my php.ini: assert.active = 1 assert.warning = 1 assert.callback = f1 assert.quiet_eval = 1 assert.bail = 0 Reproduce code: --------------- <?php function f1() { echo "f1 called\n"; } function handler($errno, $errstr) { echo "in handler()\n\n"; assert(E_RECOVERABLE_ERROR === $errno); var_dump($errstr); } //Wrong number of parameters for assert_options() assert_options(ASSERT_WARNING, 1); var_dump($rao=assert_options(ASSERT_CALLBACK,"f1",1)); //Unknown option for assert_options() var_dump($rao=assert_options("F1","f1")); //Wrong number of parameters for assert() $sa="0 != 0"; var_dump($r2=assert($sa,1)); //Catch recoverable error with handler var_dump($rc=assert('aa=sd+as+safsafasfa?saf?saf?')); Expected result: ---------------- Warning: Wrong parameter count for assert_options() in /usr/local/zend/apache2/htdocs/assert.php on line 14 NULL Warning: assert_options(): Unknown value 0 in /usr/local/zend/apache2/htdocs/assert.php on line 18 bool(false) Warning: Wrong parameter count for assert() in /usr/local/zend/apache2/htdocs/assert.php on line 22 NULL Actual result: -------------- On second and third requests: NULL bool(false) NULL