From 1e31cc81a0da4084aa7315b09c5bffb5c22356f3 Mon Sep 17 00:00:00 2001 From: azaozz Date: Wed, 15 Apr 2009 19:55:41 +0000 Subject: [PATCH] Disable PHP error reporting in gears-manifest.php, load-scripts.php and load-styles.php since they don't load wp-settings, fix some notices git-svn-id: http://svn.automattic.com/wordpress/trunk@10939 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/gears-manifest.php | 7 +++++++ wp-admin/includes/update.php | 2 +- wp-admin/load-scripts.php | 7 +++++++ wp-admin/load-styles.php | 7 +++++++ wp-includes/update.php | 1 + 5 files changed, 23 insertions(+), 1 deletion(-) diff --git a/wp-admin/gears-manifest.php b/wp-admin/gears-manifest.php index 6258f73c06..7428e51302 100644 --- a/wp-admin/gears-manifest.php +++ b/wp-admin/gears-manifest.php @@ -6,6 +6,13 @@ * @subpackage Administration */ +/** + * Disable error reporting + * + * Set this to error_reporting( E_ALL ) or error_reporting( E_ALL | E_STRICT ) for debugging + */ +error_reporting(0); + /** Set ABSPATH for execution */ define( 'ABSPATH', dirname(dirname(__FILE__)) . '/' ); define( 'WPINC', 'wp-includes' ); diff --git a/wp-admin/includes/update.php b/wp-admin/includes/update.php index 1289c76ab3..26ff3744a8 100644 --- a/wp-admin/includes/update.php +++ b/wp-admin/includes/update.php @@ -36,7 +36,7 @@ function get_core_updates( $options = array() ) { $from_api = get_transient( 'update_core' ); if ( empty($from_api) ) return false; - if ( !is_array( $from_api->updates ) ) return false; + if ( !isset( $from_api->updates ) || !is_array( $from_api->updates ) ) return false; $updates = $from_api->updates; if ( !is_array( $updates ) ) return false; $result = array(); diff --git a/wp-admin/load-scripts.php b/wp-admin/load-scripts.php index 24a8b62500..16f4bbc329 100644 --- a/wp-admin/load-scripts.php +++ b/wp-admin/load-scripts.php @@ -1,5 +1,12 @@ last_checked ) && 43200 > ( time() - $current->last_checked ) && + isset( $current->version_checked ) && $current->version_checked == $wp_version ) return;