mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-01 19:24:34 +00:00
Coding Standards: Fix instances of WordPress.PHP.NoSilencedErrors.Discouraged.
Noteable changes: - The `magic_quotes_runtime` and `magic_quotes_sybase` settings were removed in PHP 5.4, so no longer need to be set. - Some functions that use external libraries can generate errors that can't be tested for, so are globally allowed to silence errors. - Quite a few functions would cause errors if `safe_mode` was set. This setting was removed in PHP 5.4. - Only a handful of `header()` calls needed corresponding `headers_sent()` checks for unit tests to pass, but more may need to be added as the nightlies builds are tested. See #46732. git-svn-id: https://develop.svn.wordpress.org/trunk@45611 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -54,10 +54,6 @@ wp_register_fatal_error_handler();
|
||||
// Check for the required PHP version and for the MySQL extension or a database drop-in.
|
||||
wp_check_php_mysql_versions();
|
||||
|
||||
// Disable magic quotes at runtime. Magic quotes are added using wpdb later in wp-settings.php.
|
||||
@ini_set( 'magic_quotes_runtime', 0 );
|
||||
@ini_set( 'magic_quotes_sybase', 0 );
|
||||
|
||||
// WordPress calculates offsets from UTC.
|
||||
date_default_timezone_set( 'UTC' );
|
||||
|
||||
@@ -90,9 +86,9 @@ wp_debug_mode();
|
||||
* @param bool $enable_advanced_cache Whether to enable loading advanced-cache.php (if present).
|
||||
* Default true.
|
||||
*/
|
||||
if ( WP_CACHE && apply_filters( 'enable_loading_advanced_cache_dropin', true ) ) {
|
||||
if ( WP_CACHE && apply_filters( 'enable_loading_advanced_cache_dropin', true ) && file_exists( WP_CONTENT_DIR . '/advanced-cache.php' ) ) {
|
||||
// For an advanced caching plugin to use. Uses a static drop-in because you would only want one.
|
||||
WP_DEBUG ? include( WP_CONTENT_DIR . '/advanced-cache.php' ) : @include( WP_CONTENT_DIR . '/advanced-cache.php' );
|
||||
include( WP_CONTENT_DIR . '/advanced-cache.php' );
|
||||
|
||||
// Re-initialize any hooks added manually by advanced-cache.php
|
||||
if ( $wp_filter ) {
|
||||
|
||||
Reference in New Issue
Block a user