In PHP 5.3.x and older, the isset() check in code example below will
yield true. In PHP 5.4 and later, and HHVM, it will correctly yield
false. http://3v4l.org/8p3hm
$options = 'foo';
isset( $options['bar'] );
Let's not depend on this behavior here.
Change-Id: I67e83af8afe85b3ddfb5db0009759b8ac5bb7d67
$imageDesc = is_string( $options ) ? $options : $options['image'];
$allowedVariants = array_merge(
- isset( $options['variants'] ) ? $options['variants'] : array(),
+ is_array( $options ) && isset( $options['variants'] ) ? $options['variants'] : array(),
$this->getGlobalVariants( $type )
);
if ( isset( $this->variants[$type] ) ) {