Fix for create_function depracated in PHP 7.2
-
On lines 160 and 161 of file
s2member-secure-file-browser/class/psk_s2msfb.class.php
, there are instances ofcreate_function
which has been deprecated in PHP 7.2. This can be addressed by changing these lines:
add_action( ‘widgets_init’ , create_function( ” , ‘register_widget( “‘ . PSK_S2MSFB_WIDGET_DOWNLOAD_ID . ‘” );’ ) );
add_action( ‘widgets_init’ , create_function( ” , ‘register_widget( “‘ . PSK_S2MSFB_WIDGET_FILES_ID . ‘” );’ ) );
to these:
add_action( ‘widgets_init’ , function() {
register_widget( PSK_S2MSFB_WIDGET_DOWNLOAD_ID );
} );
add_action( ‘widgets_init’ , function() {
register_widget( PSK_S2MSFB_WIDGET_FILES_ID );
} );
- The topic ‘Fix for create_function depracated in PHP 7.2’ is closed to new replies.