From 3ca11d47c9a1e62e20a77409d49eb93244a41375 Mon Sep 17 00:00:00 2001 From: Andrew Ozz 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: https://develop.svn.wordpress.org/trunk@10939 602fd350-edb4-49c9-b593-d223f7449a82 --- 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;