[OJS 2.4.8.5] Rounded Corners Plugin Uses eregi()

@asmecher, in the roundedCorners plugin there is an eregi() function used in l. 86 of RoundedCornersPlugin.inc.php:

if (eregi("\/", $divPosition[$i2][0])) {

eregi() was removed in PHP7.x, so I get a fatal php error on this. Couldn’t this be replaced by

if (preg_match('/\//i', $divPosition[$i2][0]))

? (Although the /i option is not important, when searching for / …)

Thanks, Tobias

Hi @twa,

Yes, that’s the proposed solution over at Is the rounded corners plugin broken in 2.4.8-5?. We’re unlikely to release any more packages of OJS 2.x so I’d suggest keeping that as a local modification.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

We just made the change too for php 7. I thought someone mentioned that php 7 fixes were rolled up into 2.4.8.5 but it seems not as we just ran the 2.4.8.1 to 2.4.8.5 upgrade and ran into this again. Alas, I checked my notes it seems that there is no mention of this fix being rolled up in any release. Sorry!

Cheers!

Thanks, @asmecher – I’ve overseen this thread.

You will not release any further OJS2.x? That’s good to know, because then I’ll inform my editorial team, that we’ll upgrade in the next weeks to OJS3.

Thanks, Tobias

Hi @twa,

If we encounter a critical issue, e.g. a security problem, then we may release an additional package – but yes, I’d suggest making plans to upgrade to OJS 3.x.

Regards,
Alec Smecher
Public Knowledge Project Team

Hej @asmecher,

where exactly do I find OJS2.4.8 in github BTW?

Thanks, Tobias

Hi @twa,

It’s the ojs-stable-2_4_8 branch.

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher Hm, I think, this was not, was I intended to do:
[ojs-stable-2_4_8:] Rounded Corner Plugin: Change »eregi()« to »preg_match()« by TobiasWantzen · Pull Request #2486 · pkp/ojs · GitHub

How do I make a simple »Bug report« in github without comparing branches?

Thanks, Tobias

Hi @twa,

I think what you’re asking for is a git issue, rather than a pull request. But the best thing to do would be to create a pull request including the change you propose – if you’re not comfortable using git on your own machine, try the editing feature directly in github. Use the pencil icon at ojs/RoundedCornersPlugin.inc.php at ojs-stable-2_4_8 · pkp/ojs · GitHub to get started and it’ll guide you through opening a pull request.

Regards,
Alec Smecher
Public Knowledge Project Team

Hej @asmecher,

yes, thank you! It’s badly needed, that I invest some time in learning github … I now made a correct pull request.

Tobias

Hi @twa,

That’s perfect – merged, thanks for contributing!

Regards,
Alec Smecher
Public Knowledge Project Team