[wp-hackers] Help with PHP 5.4.4 Warning
Otto
otto at ottodestruct.com
Wed Aug 8 11:13:53 UTC 2012
On Wed, Aug 8, 2012 at 3:21 AM, Rafael Ehlers <rafaehlers at gmail.com> wrote:
> On PHP 5.4.4 a new kind of Warning(s) are appearing on Anything Slider
> plugin ( http://wordpress.org/extend/plugins/anythingslider-for-wordpress/
> ), warnings like this:
>
> *Warning*: Illegal string offset 'order' in....
Why didn't you post the full error message? That bit you left off is
the important bit.
Anyway, this error comes from things like this:
$order = ( $attr['order'] ) ? $attr['order'] : 'ASC';
Here he's referencing $attr['order'] without checking to see if it's
set or not. This should be:
$order = ( isset( $attr['order'] ) ) ? $attr['order'] : 'ASC';
-Otto
More information about the wp-hackers
mailing list