Doc #63787 [NEW]: Array_unique notice (array to string conversion)
| From: | enumag at gmail dot com | Date: | Mon, 17 Dec 2012 12:04:41 +0000 |
| Subject: | Doc #63787 [NEW]: Array_unique notice (array to string conversion) | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-9292@lists.php.net to get a copy of this message | ||
From: enumag at gmail dot com
Operating system: any
PHP version: 5.4.9
Package: Arrays related
Bug Type: Documentation Problem
Bug description:Array_unique notice (array to string conversion)
Description:
------------
If array_unique gets an array of arrays as it's parameter and a custom
$sort_flag is not provided, it throws this error (array to string
conversion). The reason is obvious, any value is changed to a string and
then compared. The problem is that it took me quite some time to figure it
out and a less experienced programmer is totally clueless.
Not sure if this can be fixed in PHP without BC break but at the very least
it could be mentioned in documentation of array_unique function.
--
Edit bug report at https://bugs.php.net/bug.php?id=63787&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63787&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63787&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63787&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=63787&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=63787&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=63787&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=63787&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=63787&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=63787&r=support
Expected behavior: https://bugs.php.net/fix.php?id=63787&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=63787&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=63787&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=63787&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63787&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=63787&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=63787&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=63787&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63787&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=63787&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=63787&r=mysqlcfg