array_unique returns NULLI am dealing with legacy code written by another team and someone asked me why his images were not showing up... Took me an hour to dig that one out. Simply because the optional second parameter to array_unique() was only added in php 5.2.9 and we were using 5.2.4 ... Therefore it was generating an error that was hidden (because of error_reporting) and returning null. I removed the second parameter and VOILA! Too bad the sysadmin does not allow us to upgrade PHP. :)
|
SearchDrupal ContributionsMake a Payment to Christian Roy |
Well... it is :) sort of
@Anonymous: It is not a question of consideration (I would if I could). The current systen is under FreeBSD and we are going to Ubuntu (OS and version is imposed by the Sysadmin group) so the dev server is currently on php 5.2.4 which will be what the new production server will be once we migrate the application on Ubuntu. At that point (soon) the dev will be exacly the same. Until that time, it will not be the same. In fact, it is good that the dev that we have now is how the new production will be. It allowed us to see this problem before we actually migrated the code :)
So one could say that we have the same environment after all since the new prod will be like our (new) dev. :)
--
Christian Roy
Maybe you should concider
Maybe you should concider using the same environement for development then the one you have in production.
It helps prevent these errors.
Post new comment