Is the rounded corners plugin broken in 2.4.8-5?
I am trying to upgrade from 2.4.8.1 to 2.4.8-5 and that plugin tossed an exception.
What other plugins are not compatible with 2.4.8-5?
Thanks!
Is the rounded corners plugin broken in 2.4.8-5?
I am trying to upgrade from 2.4.8.1 to 2.4.8-5 and that plugin tossed an exception.
What other plugins are not compatible with 2.4.8-5?
Thanks!
Hi @radjr,
I presume this is related to the error message you posted on another thread?
Fatal error : Uncaught Error: Call to undefined function eregi() in /var/www/html/ojs/plugins/generic/roundedCorners/RoundedCornersPlugin.inc.php:86 Stack trace: #0 /var/www/html/ojs/plugins/generic/roundedCorners/RoundedCornersPlugin.inc.php(55): RoundedCornersPlugin::_getDivs(’<div class="blo…’, ‘block’) #1 /var/www/html/ojs/lib/pkp/lib/smarty/Smarty.class.php(1276): RoundedCornersPlugin::roundOutputFilter(’<div class="blo…’, Object(TemplateManager)) #2 /var/www/html/ojs/lib/pkp/classes/template/PKPTemplateManager.inc.php(296): Smarty->fetch(‘file:/var/www/h…’, NULL, NULL, false) #3 /var/www/html/ojs/lib/pkp/classes/plugins/BlockPlugin.inc.php(147): PKPTemplateManager->fetch(‘file:/var/www/h…’) #4 /var/www/html/ojs/plugins/blocks/subscription/SubscriptionBlockPlugin.inc.php(91): BlockPlugin->getContents(Object(TemplateManager), Object(Request)) #5 /var/www/html/ojs/lib/pkp/classes/plugins/BlockPlugin.inc.php(161): SubscriptionBlockPlugin->getContents(Object(TemplateManager), Object(Request)) #6 /var/www/html/ojs/ in /var/www/html/ojs/plugins/generic/roundedCorners/RoundedCornersPlugin.inc.php on line 86
Regards,
Alec Smecher
Public Knowledge Project Team
The Rounded corners plugin contains the eregi
function that is no longer available in PHP 7 and can be replaced by preg_match
(reference https://stackoverflow.com/questions/9954064/ereg-eregi-replacement-for-php-5-3)
My solution was to replace the line 86 in ojs/plugins/generic/roundedCornersRoundedCornersPlugin.inc.php
with:
if (preg_match("/\//i", $divPosition[$i2][0])) {
Cheers,
Ales
Just a warning here, check server behaviour afterwards. I don’t know if it is related to this fix, but yesterday my error_log
got inflated to several gigabytes with “preg_match” errors. I restarted the whole server and the errors stopped. The problem file was something else, not from the Rounded corners plugin, but I didn’t take note and now I can’t remember what was it.
Regards, Ales
Thanks Folks. Decided that we could do without the rounded corners plugin for now!
Yes, thanks. Thought it was better to create a standalone thread on this topic. Sorry for the confusion.