|  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
 [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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 18:01:28 2024 UTC