From:             tautolog at gmail dot com
Operating system: unknown
PHP version:      5.2.4
PHP Bug Type:     Unknown/Other Function
Bug description:  defined() not catching class lookup miss properly

Description:
------------
Hi,

It appears that defined() is not catching a class lookup miss properly,
and throwing a fatal error instead.

This is happening on a customer's 5.2.4 install. It works fine on my 5.2.3
install.

I haven't actually seen it for myself, but a customer told me that he is
on php 5.2.4 and that he got this error:
[Wed Sep 19 09:20:17 2007] [error] [client 85.178.73.32] PHP Fatal error:
Class '.. ' not found in
/var/www/html/mb5/lib-action/include/smarty/core/plugins/modifier.constant.php
on line 20

And that line is:
        if (defined($string)) {

The values of $string at that point was probably this:
".. :: 1000 MB Webspace :: 100 GB Traffic :: .."

Thank you,

Ben

Reproduce code:
---------------
echo "<?php echo (int) defined('.. :: 1000 MB Webspace :: 100 GB Traffic
:: ..'); " | php

Expected result:
----------------
0

Actual result:
--------------
PHP Fatal error: Class '.. ' not found

-- 
Edit bug report at http://bugs.php.net/?id=42770&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=42770&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=42770&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=42770&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=42770&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=42770&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=42770&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=42770&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=42770&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=42770&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=42770&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=42770&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=42770&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=42770&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=42770&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=42770&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=42770&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=42770&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=42770&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=42770&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=42770&r=mysqlcfg

Reply via email to