From 1cce2a89fd520b3ee61b0892fa5449d966e3f7dc Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 29 Oct 2013 20:05:16 +0000 Subject: [PATCH] PHP4 compatibility for files loaded before we bail. fixes #25760. git-svn-id: https://develop.svn.wordpress.org/trunk@25986 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/default-constants.php | 4 ++-- src/wp-includes/l10n.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wp-includes/default-constants.php b/src/wp-includes/default-constants.php index bc6c79a80b..7326d6c849 100644 --- a/src/wp-includes/default-constants.php +++ b/src/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/src/wp-includes/l10n.php b/src/wp-includes/l10n.php index 0687ca6b89..cd0ead996d 100644 --- a/src/wp-includes/l10n.php +++ b/src/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; }