WPIntell

Source evidence

twitterPlugin crashes with PHP 7.3

Twitter · support · 2019-03-17T02:55:00+00:00

complaintsentiment
highseverity
0.91relevance
1replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

3 / 22 rows with source links

13.6% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

19 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
cumthsc unresolved
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 ) { It’s a bit more complicated than the above patch. With the patch, I get the expected content on the page, but I still get the error: [Sat Mar 16 23:12:24.522757 2019] [php7:warn] [pid 15329] [client 69.201.44.30:55718] PHP Warning: preg_replace_callback(): Requires argument 2, ‘displayTwitterPlugin(true)’, to be a valid callback in /var/www/html/coin-or/wordpress/wp-content/plugins/twitter-feed/twitterPlugin.php on line 271, Not sure how to fix that one. Wrapping ‘displayTwitterPlugin(true)’ in an anonymous function along the lines of https://secure.php.net/manual/en/function.preg-replace-callback.php doesn’t work. It fixes the error message, but the page is comlpletely blank.

Comments

1 shown
cumthsc 2019-03-17T03:16:00+00:00

It’s a bit more complicated than the above patch. With the patch, I get the expected content on the page, but I still get the error: [Sat Mar 16 23:12:24.522757 2019] [php7:warn] [pid 15329] [client 69.201.44.30:55718] PHP Warning: preg_replace_callback(): Requires argument 2, ‘displayTwitterPlugin(true)’, to be a valid callback in /var/www/html/coin-or/wordpress/wp-content/plugins/twitter-feed/twitterPlugin.php on line 271, Not sure how to fix that one. Wrapping ‘displayTwitterPlugin(true)’ in an anonymous function along the lines of https://secure.php.net/manual/en/function.preg-replace-callback.php doesn’t work. It fixes the error message, but the page is comlpletely blank.