twitterPlugin crashes with PHP 7.3
-
To reproduce: visit a page that loads the plugin and runs PHP 7.3.
Result: No content displayed. From httpd error.log:
[Sat Mar 16 22:32:52.406315 2019] [php7:warn] [pid 13748] [client 69.201.44.30:54776] PHP Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /var/www/html/coin-or/wordpress/wp-content/plugins/twitter-feed/twitterPlugin.php on line 269, referer: https://www.coin-or.org/From diff, the fix:
# diff -c twitterPlugin.php.orig twitterPlugin.php
*** twitterPlugin.php.orig 2014-10-24 13:55:25.000000000 -0400
— twitterPlugin.php 2019-03-16 22:40:41.737995615 -0400
***************
*** 266,272 ****function processKeyword( $strContent )
{
! $strContent = preg_replace( “/\[twitter\]/ise”, “displayTwitterPlugin(true)”, $strContent, -1, $intMatches );if ( $intMatches > 0 )
{
— 266,276 —-function processKeyword( $strContent )
{
! $strContent = preg_replace_callback(
! “/\[twitter\]/is”,
! “displayTwitterPlugin(true)”,
! $strContent, -1, $intMatches
! );if ( $intMatches > 0 )
{
- The topic ‘twitterPlugin crashes with PHP 7.3’ is closed to new replies.