X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=includes%2Fcache%2FCacheHelper.php;h=d1261a807624d648ca5b007fc96303bf91fe062a;hb=8b1a6cc58af722aff053c8b30948ae751e6d7f29;hp=d798ddbcb3de2cf2d27c7b98ba7db1da4b5bf8bc;hpb=22ac82f4cd7960735339d23865fce21665ea9c17;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/cache/CacheHelper.php b/includes/cache/CacheHelper.php index d798ddbcb3..d1261a8076 100644 --- a/includes/cache/CacheHelper.php +++ b/includes/cache/CacheHelper.php @@ -82,9 +82,9 @@ class CacheHelper implements ICacheHelper { * Function that gets called when initialization is done. * * @since 1.20 - * @var callable + * @var callable|null */ - protected $onInitHandler = false; + protected $onInitHandler; /** * Elements to build a cache key with. @@ -183,7 +183,7 @@ class CacheHelper implements ICacheHelper { $this->hasCached = is_array( $cachedChunks ); $this->cachedChunks = $this->hasCached ? $cachedChunks : []; - if ( $this->onInitHandler !== false ) { + if ( $this->onInitHandler !== null ) { call_user_func( $this->onInitHandler, $this->hasCached ); } }