From f2e591e4c24122f670ed3cbf1eaa66803ab75fed Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 29 Oct 2013 20:08:08 +0000 Subject: [PATCH] PHP4 compatibility for files loaded before we bail. fixes #25760. Merges [25986] to the 3.7 branch. Built from https://develop.svn.wordpress.org/branches/3.7@25987 git-svn-id: http://core.svn.wordpress.org/branches/3.7@25923 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/about.php | 2 +- wp-includes/default-constants.php | 4 ++-- wp-includes/l10n.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-admin/about.php b/wp-admin/about.php index 8984d8254fef..c0ef6c60361e 100644 --- a/wp-admin/about.php +++ b/wp-admin/about.php @@ -38,7 +38,7 @@

Version %1$s addressed %2$s bug.', - 'Version %1$s addressed %2$s bugs.', 10 ), '3.7.1', number_format_i18n( 10 ) ); ?> + 'Version %1$s addressed %2$s bugs.', 11 ), '3.7.1', number_format_i18n( 11 ) ); ?> the release notes.' ), 'http://codex.wordpress.org/Version_3.7.1' ); ?>

diff --git a/wp-includes/default-constants.php b/wp-includes/default-constants.php index bc6c79a80b38..7326d6c8499d 100644 --- a/wp-includes/default-constants.php +++ b/wp-includes/default-constants.php @@ -42,10 +42,10 @@ function wp_initial_constants() { if ( function_exists( 'memory_get_usage' ) ) { $current_limit = @ini_get( 'memory_limit' ); $current_limit_int = intval( $current_limit ); - if ( false !== stripos( $current_limit, 'G' ) ) + if ( false !== strpos( $current_limit, 'G' ) ) $current_limit_int *= 1024; $wp_limit_int = intval( WP_MEMORY_LIMIT ); - if ( false !== stripos( WP_MEMORY_LIMIT, 'G' ) ) + if ( false !== strpos( WP_MEMORY_LIMIT, 'G' ) ) $wp_limit_int *= 1024; if ( -1 != $current_limit && ( -1 == WP_MEMORY_LIMIT || $current_limit_int < $wp_limit_int ) ) diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php index 0687ca6b8942..cd0ead996dcb 100644 --- a/wp-includes/l10n.php +++ b/wp-includes/l10n.php @@ -797,9 +797,9 @@ function wp_get_pomo_file_data( $po_file ) { 'Project-Id-Version' => '"Project-Id-Version', 'X-Generator' => '"X-Generator', ) ); - foreach ( $headers as &$header ) { + foreach ( $headers as $header => $value ) { // Remove possible contextual '\n' and closing double quote. - $header = preg_replace( '~(\\\n)?"$~', '', $header ); + $headers[ $header ] = preg_replace( '~(\\\n)?"$~', '', $value ); } return $headers; }