From 94be17087702b317e0231e873888449bc643ef64 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 24 Jun 2014 16:05:54 +0000 Subject: [PATCH] Use direct typecasting instead of intval() for better performance. props kovshenin. see #25788. git-svn-id: https://develop.svn.wordpress.org/trunk@28823 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/update.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/update.php b/src/wp-includes/update.php index f79941f97e..3747ea8fb9 100644 --- a/src/wp-includes/update.php +++ b/src/wp-includes/update.php @@ -268,7 +268,7 @@ function wp_update_plugins( $extra_stats = array() ) { $timeout = 30; } else { // Three seconds, plus one extra second for every 10 plugins - $timeout = 3 + intval( count( $plugins ) / 10 ); + $timeout = 3 + (int) ( count( $plugins ) / 10 ); } $options = array( @@ -423,7 +423,7 @@ function wp_update_themes( $extra_stats = array() ) { $timeout = 30; } else { // Three seconds, plus one extra second for every 10 themes - $timeout = 3 + intval( count( $themes ) / 10 ); + $timeout = 3 + (int) ( count( $themes ) / 10 ); } $options = array(