From c50eaee3d32313a7818bbb1db5404289b535d9c1 Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Thu, 11 Mar 2010 21:58:17 +0000 Subject: [PATCH] Fix a possible undefined offset warning in do_action. Fixes #11241 props chrisbliss18. git-svn-id: https://develop.svn.wordpress.org/trunk@13674 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/plugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/plugin.php b/wp-includes/plugin.php index 3a9c507a6d..bb41bd0ad7 100644 --- a/wp-includes/plugin.php +++ b/wp-includes/plugin.php @@ -321,7 +321,7 @@ function do_action($tag, $arg = '') { } $args = array(); - if ( is_array($arg) && 1 == count($arg) && is_object($arg[0]) ) // array(&$this) + if ( is_array($arg) && 1 == count($arg) && isset($arg[0]) && is_object($arg[0]) ) // array(&$this) $args[] =& $arg[0]; else $args[] = $arg;