diff --git a/Cdnfsd_CacheFlush.php b/Cdnfsd_CacheFlush.php index 7a42a2c31..a440741bb 100644 --- a/Cdnfsd_CacheFlush.php +++ b/Cdnfsd_CacheFlush.php @@ -40,7 +40,7 @@ public static function w3tc_flush_all( $extras = null ) { $w3tc_config = Dispatcher::config(); $common = Dispatcher::component( 'Cdn_Core' ); $default_override = Cdn_Util::get_flush_manually_default_override(); - if ( $w3tc_config->get_boolean( 'cdn.flush_manually', $default_override ) ) { + if ( $w3tc_config->get_boolean( 'cdn.flush_manually' ) === $default_override ) { // in this mode flush only on purge button clicks. if ( ! isset( $extras['ui_action'] ) ) { return true; diff --git a/UsageStatistics_StorageWriter.php b/UsageStatistics_StorageWriter.php index 074a36f23..70f61ba4a 100644 --- a/UsageStatistics_StorageWriter.php +++ b/UsageStatistics_StorageWriter.php @@ -175,7 +175,7 @@ public function maybe_flush_hotspot_data() { */ public function begin_flush_hotspot_data() { $hotspot_endtime = $this->get_hotspot_end(); - if ( is_null( $hotspot_endtime ) ) { + if ( null === $hotspot_endtime ) { // if cache not recognized - means nothing is cached at all so stats not collected. return 'not_needed'; } diff --git a/lib/Google/Model.php b/lib/Google/Model.php index 872c6b5c9..f04d1a064 100644 --- a/lib/Google/Model.php +++ b/lib/Google/Model.php @@ -62,7 +62,7 @@ public function __get($key) $val = null; } - if ($this->isAssociativeArray($val)) { + if (is_array($val) && $this->isAssociativeArray($val)) { if (isset($this->$keyDataType) && 'map' == $this->$keyDataType) { foreach ($val as $arrayKey => $arrayItem) { $this->modelData[$key][$arrayKey] =