From:             victor-php at boivie dot com
Operating system: FreeBSD, Windows XP
PHP version:      5.0.0
PHP Bug Type:     Scripting Engine problem
Bug description:  $bar = empty(trim($foo)) ? 1 : 0 will generate error

Description:
------------
Look at the reproducable code below. 

Reproduce code:
---------------
$foo = ""; // Doesn't matter
$bar = empty(trim($foo)) ? 1 : 0;
echo $bar;

Expected result:
----------------
1

Actual result:
--------------
Fatal error:  Can't use function return value in write context in bug.php
on line 2


-- 
Edit bug report at http://bugs.php.net/?id=29341&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29341&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29341&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=29341&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=29341&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=29341&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=29341&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=29341&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=29341&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=29341&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=29341&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=29341&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=29341&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29341&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=29341&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=29341&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=29341&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29341&r=float

Reply via email to