Bug #55411 [Com]: undefined class constant doesn't show up via AJAX
| From: | r1pp3r dot j4ck at gmail dot com | Date: | Fri, 12 Aug 2011 12:07:49 +0000 |
| Subject: | Bug #55411 [Com]: undefined class constant doesn't show up via AJAX | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-162546@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55411&edit=1
ID: 55411
Comment by: r1pp3r dot j4ck at gmail dot com
Reported by: r1pp3r dot j4ck at gmail dot com
Summary: undefined class constant doesn't show up via AJAX
Status: Bogus
Type: Bug
Package: Class/Object related
Operating System: Linux
PHP Version: 5.3.6
Block user comment: N
Private report: N
New Comment:
I mean it gave me a fatal error without actually informing me about it.
Previous Comments:
------------------------------------------------------------------------
[2011-08-12 12:06:32] r1pp3r dot j4ck at gmail dot com
I'm sorry, I was a bit tired, so... the problem occurred to me when I was in a
public function, and it never created a log entry. It gave me a fatal error
without using the function with the undefined constant, the test script was bad,
sorry.
------------------------------------------------------------------------
[2011-08-12 11:57:21] pierrick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
You have a syntax error, you can not do an echo directly into the class body.
------------------------------------------------------------------------
[2011-08-12 09:51:12] r1pp3r dot j4ck at gmail dot com
Description:
------------
Fatal error: undefined class constant doesn't show up via AJAX, neither in the
error log, so it crashes without any warning making the debugging really
complicated. Actually the file doesn't load at all, tried with string out of the
<?php ?> tags.
Test script:
---------------
asdfasdf
<?php
class random
{
const test = 1;
echo $this::tes;
}
?>
Expected result:
----------------
asdfasdf
Undefined class constant 'tes' in ...
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55411&edit=1