cache-master icon indicating copy to clipboard operation
cache-master copied to clipboard

Fatal error due to use of not yet loaded function

Open FlyingDR opened this issue 4 years ago • 0 comments

As of v2.1.1 of the plugin it is possible that plugin will cause fatal error: Call to undefined function wp_hash()

It happens because plugins are loaded before loading of wp-includes/pluggable.php where wp_hash() function is defined.

wp_hash() is used inside scm_set_dir_hash() which, in turn may be called during instantiation of Cache_Master class.

Switch to lazy initialization of Cache_Master::$driver will solve issue.

FlyingDR avatar Mar 24 '21 13:03 FlyingDR