One of our coders have pinged me that he is getting a weird error message "Warning: uksort(): Array was modified by the user comparison function". The array sort callback was doing a database query on the first run, stored the results and used that to sort. For sure it was not modifying the parent array. Fairly innocent, isn't it? Well, actually not. It turns out that last August a check was added to PHP 5.2 and 5.3 (released in 5.2.11 and 5.3.1) to verify that the array being sorted does not change, however debug_backtrace()
fools this check. Guess what? We use debug_backtrace()
when logging queries (like, you know, when doing development) to find the caller of the query. It's also used in watchdog
. There is an open PHP bug report for this but I thought a blog post warning people to keep their array sort callbacks simple in Drupal 7 is a good idea.
Commenting on this Story is closed.
I can’t agree with you more!
In the beginning there was nothing, which exploded.Thank you for featuring my article in this site... so keep enjoyment....... nice site design
Free Ads in classifieds
Free Advertising
Free Classified Ads
Free Job Postings
Shop the latest styles Juicy Couture handbags, juicy couture tracksuit.
Juicy couture sale, juicy couture outlet.
Juicy Couture
Juicy Couture Bags
Juicy Couture handbags
An online shop specializing in Herve Leger, Herve Leger Dress, Herve Leger Skirt,
Herve Leger Sale, Herve Leger Dresses.All new style in our store.
Herve Leger
Herve Leger Dresses
The Certkey law passed 640-802 despite nearly unanimous640-816 Republican opposition. It sought to 640-822 rein in a financial system that had 642-901 sped ahead of outdated rules,350-001 allowing banks, traders and others to take increased risks.