|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76501 Funny message with fatal error
Submitted: 2018-06-19 15:52 UTC Modified: 2018-07-04 01:04 UTC
From: Assigned: kalle (profile)
Status: Closed Package: Unknown/Other Function
PHP Version: 7.3.0alpha1 OS: Any
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:
New email:
PHP Version: OS:


 [2018-06-19 15:52 UTC]
Here are two examples of Fatal error, that bears a funny error message.

<?php break 1.0;
PHP Fatal error:  'break' operator accepts only positive numbers

<?php break true;
'break' operator with non-constant operand is no longer supported

Test script:
<?php break 1.0;

Those are two separate scripts. 

<?php break true;

<?php const A=1; break A;
PHP Fatal error:  'break' operator with non-constant operand is no longer supported

Expected result:
"only positive numbers" is misleading, and should mention 'only positive integers'.

That would work for "true", and "A" too : "non-constant operand" is misleading too. 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-07-04 01:04 UTC]
Automatic comment on behalf of kalle
Log: Fixed bug #76501 (Funny message with fatal error)
 [2018-07-04 01:04 UTC]
-Status: Open +Status: Closed
 [2018-07-04 01:04 UTC]
-Assigned To: +Assigned To: kalle
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Jun 04 21:03:39 2023 UTC