|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44326 wrong assert output-phpt:php-5.2.5/ext/standard/tests/assert/assert_error1.phpt
Submitted: 2008-03-04 16:54 UTC Modified: 2008-04-04 01:00 UTC
From: eyal at zend dot com Assigned: fb-req-jani (profile)
Status: No Feedback Package: *General Issues
PHP Version: 5.2.5 OS: Linux any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
44 - 5 = ?
Subscribe to this entry?

 [2008-03-04 16:54 UTC] eyal at zend dot com
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: = 1
assert.warning = 1
assert.callback = f1
assert.quiet_eval = 1
assert.bail = 0

Reproduce code:
function f1()
        echo "f1 called\n";
function handler($errno, $errstr) {
        echo "in handler()\n\n";
        assert(E_RECOVERABLE_ERROR === $errno);

//Wrong number of parameters for assert_options()
assert_options(ASSERT_WARNING, 1);

//Unknown option for assert_options()

//Wrong number of parameters for  assert()
$sa="0 != 0";

//Catch recoverable error with handler

Expected result:
Warning: Wrong parameter count for assert_options() in /usr/local/zend/apache2/htdocs/assert.php on line 14

Warning: assert_options(): Unknown value 0 in /usr/local/zend/apache2/htdocs/assert.php on line 18

Warning: Wrong parameter count for assert() in /usr/local/zend/apache2/htdocs/assert.php on line 22

Actual result:
On second and third requests:
NULL bool(false) NULL 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-05 02:34 UTC]
Works fine here... Warnings are showed.
 [2008-03-27 09:51 UTC]
Did you set the "display_errors = On" and possibly "error_reporting = E_ALL" in your php.ini too?
 [2008-04-04 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 23 07:01:31 2024 UTC