|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54424 failed assert with ASSERT_BAIL exits with return code == 0
Submitted: 2011-03-30 15:04 UTC Modified: -
Avg. Score:4.3 ± 0.5
Reproduced:6 of 6 (100.0%)
Same Version:3 (50.0%)
Same OS:4 (66.7%)
From: jakub dot lopuszanski at nasza-klasa dot pl Assigned:
Status: Open Package: *General Issues
PHP Version: 5.3.6 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: jakub dot lopuszanski at nasza-klasa dot pl
New email:
PHP Version: OS:


 [2011-03-30 15:04 UTC] jakub dot lopuszanski at nasza-klasa dot pl
Failed assertions should be signaled by non-zero return code from the script as they are errors.

Test script:
$ cat example.php
assert_options(ASSERT_BAIL,     true);
$ php example.php
PHP Warning:  assert(): Assertion failed in /home/lopuszanski/projects/NK-2/tests/php/example.php on line 3
$ echo $?

Expected result:
echo $? should display some nonzero return code

Actual result:


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Jan 24 10:01:24 2021 UTC