From: TorrAB at Yahoo dot com
Operating system: Windows XP
PHP version: 5.5.3
Package: Compile Failure
Bug Type: Bug
Bug description:cannot dereference array
Description:
------------
Parse error: syntax error, unexpected "(T_ENCAPSED_AND_WHITESPACE),
expecting identifier (T_STRING) or variable (T_VARIABLE) or number
(T_NUM_STRING).
Apparently, the parser cannot dereference $Apt['Color']. May be linked to
bug 23022. But why the <unexpected ">?
Test script:
---------------
<?php
#No error, using intermediate var $Colo:
forEach ($GLOBALS['Aps'] as $GLOBALS['X'] => $Apt){
$Colo=$Apt['Color'];
echo "<div class='row' style=\"background-color: $Colo\">";
echo '</div>';}
#Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE),
expecting identifier (T_STRING) or variable (T_VARIABLE) or number
(T_NUM_STRING) in C:\Apache24\htdocs\GoodBadB.php on line 10:
forEach ($GLOBALS['Aps'] as $GLOBALS['X'] => $Apt){
echo "<div class='row' style=\"background-color:
$Apt['Color']\">";
#Apparently, the parser cannot dereference $Apt['Color']. May be linked to
bug 23022. But why the <unexpected ">?
echo '</div>';}
?>
--
Edit bug report at https://bugs.php.net/bug.php?id=65635&edit=1
--
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=65635&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=65635&r=trysnapshot53
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=65635&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=65635&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=65635&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=65635&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=65635&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=65635&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=65635&r=support
Expected behavior: https://bugs.php.net/fix.php?id=65635&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=65635&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=65635&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=65635&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65635&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=65635&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=65635&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=65635&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65635&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=65635&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=65635&r=mysqlcfg