[PHP-BUG] Bug #71164 [NEW]: Array to string convertion error
[email protected] ("deemdouxla at gmail dot com")
| Newsgroups | php.bugs |
|---|---|
| Message-ID | <[email protected]> |
From: deemdouxla at gmail dot com Operating system: Windows 10 x64 Bit PHP version: 7.0.1 Package: *General Issues Bug Type: Bug Bug description:Array to string convertion error Description: ------------ PHP 7.0.1 Thread Safe on Windows Throws String convertion error. This happened when I tried to access database object Test script: --------------- $obj = $db->results(); $arr = ['tbfield1', 'tbfield2', 'tbfield3']; // Get column tbfield1 $getColumnArray = $obj->$arr[0]; // Then PHP 7.0.1 throws error String convertion error Expected result: ---------------- Return array of column from PHP stdClass Actual result: -------------- ErrorException: Array to string conversion -- Edit bug report at https://bugs.php.net/bug.php?id=71164&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71164&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71164&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71164&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=71164&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=71164&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=71164&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=71164&r=needscript Try newer version: https://bugs.php.net/fix.php?id=71164&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=71164&r=support Expected behavior: https://bugs.php.net/fix.php?id=71164&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=71164&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=71164&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=71164&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71164&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=71164&r=dst IIS Stability: https://bugs.php.net/fix.php?id=71164&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=71164&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=71164&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=71164&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=71164&r=mysqlcfg