Hi there,
if you are using RokCommon on your site which is required for both RokSprocket and RokGallery to work and if your server is running PHP 7.2.x, you may have come across the following:
Using Joomla:
PHP Deprecated: Function create_function() is deprecated in ../libraries/rokcommon/RokCommon/Service/ContainerImpl.php on line 460
PHP Deprecated: Function create_function() is deprecated in ../libraries/rokcommon/RokCommon/Service/ContainerImpl.php on line 461
Using WordPress:
PHP Deprecated: Function create_function() is deprecated in ../wp-content/plugins/wp_rokcommon/RokCommon/Service/ContainerImpl.php on line 460
PHP Deprecated: Function create_function() is deprecated in ../wp-content/plugins/wp_rokcommon/RokCommon/Service/ContainerImpl.php on line 461
to get rid of these error notices, please open the file ContainerImpl.php and find the lines 460 and 461:$id = preg_replace_callback('/(^|_|-)+(.)/', create_function ('$matches', 'return strtoupper($matches[2]);'), $id);
$id = preg_replace_callback('/\.(.)/', create_function ('$matches', 'return "_".strtoupper($matches[1]);'), $id);
and replace them with the lines below:$id = preg_replace_callback('/(^|_|-)+(.)/', function ($matches) { return strtoupper($matches[2]); }, $id);
$id = preg_replace_callback('/\.(.)/', function ($matches) { return "_".strtoupper($matches[1]); }, $id);
The mentioned change will be avaible soon in the upcoming update releases for RokCommon/RokGallery/RokSprocket.
The following users have thanked you: Henning, C J Gilbert, Fernando H Uribe, MrT, Jean-Pierre d'Argent, Joep van Stratum, Justin Jahns, Luis Daniel Lucio Quiroz, Tim Sorenson