I have the following line of code that is throwing an error when used in PHP 5.3.1 and 5.3.8 and I presume all of 5.3.x. Only noticed it when I uploaded it to a server as it works fine on my local PHP 5.4.3
if (isset($args[0]['field_date']['und'][0]['value']['date'])) {
// Do stuff
}
The error that is coming up is
Cannot use string offset as an array in my_module.module line 9
How are you initializing
$args? You can’t use it as a string prior to performing array functions on it.http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/