Scripts: in WP_Scripts::set_group(), the args prop of the _WP_Dependency instance defaults to null - check that it is set before comparing.

Props tivnet, chriscct7.
Fixes #25462.


git-svn-id: https://develop.svn.wordpress.org/trunk@34862 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2015-10-06 13:53:19 +00:00
parent d71eb86075
commit 79a907edf3

View File

@ -247,7 +247,7 @@ class WP_Scripts extends WP_Dependencies {
* @return bool Not already in the group or a lower group
*/
public function set_group( $handle, $recursion, $group = false ) {
if ( $this->registered[$handle]->args === 1 )
if ( isset( $this->registered[$handle]->args ) && $this->registered[$handle]->args === 1 )
$grp = 1;
else
$grp = (int) $this->get_data( $handle, 'group' );