From e261ac43e71e909ef3ad953b2119f5b09425833a Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 27 Oct 2011 20:00:09 +0000 Subject: [PATCH] Avoid 'Only variables should be passed by reference' warnings. Props SergeyBiryukov. see #18975 git-svn-id: http://svn.automattic.com/wordpress/trunk@19072 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/menu.php | 3 ++- wp-includes/pomo/mo.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/menu.php b/wp-admin/includes/menu.php index 03d9bece87..1eae8576c7 100644 --- a/wp-admin/includes/menu.php +++ b/wp-admin/includes/menu.php @@ -215,7 +215,8 @@ if ( apply_filters('custom_menu_order', false) ) { } // Remove the last menu item if it is a separator. -$last_menu_key = array_pop( $last_menu_key = array_keys( $menu ) ); +$last_menu_key = array_keys( $menu ); +$last_menu_key = array_pop( $last_menu_key ); if ( !empty( $menu ) && 'wp-menu-separator' == $menu[ $last_menu_key ][ 4 ] ) unset( $menu[ $last_menu_key ] ); unset( $last_menu_key ); diff --git a/wp-includes/pomo/mo.php b/wp-includes/pomo/mo.php index 683d3ed6a5..d76cda5c6b 100644 --- a/wp-includes/pomo/mo.php +++ b/wp-includes/pomo/mo.php @@ -195,7 +195,8 @@ class MO extends Gettext_Translations { $translation = $reader->substr( $strings, $t['pos'], $t['length'] ); if ('' === $original) { - $this->set_headers($this->make_headers($translation)); + $headers = $this->make_headers($translation); + $this->set_headers($headers); } else { $entry = &$this->make_entry($original, $translation); $this->entries[$entry->key()] = &$entry;