Open Smiles-v opened 4 years ago
Hi @Smiles-v. Is it possible for you to retrieve the file and the contents of line 5392?
The only pregmatch() in this lib is: ```'/^[a-z]{2}(?:[-][A-Z]{2})?$/iu'```
I tested it: https://3v4l.org/lWV0N. Works fine in all PHP versions.
I guess the escaping is not completely there, it could be improved:
'/^[a-z]{2}(?:[\\-_][A-Z]{2})?$/iu'
Weirdly the pattern is only 32 chars not 40 as in the error.
Sure.
line 5295 if (preg_match($pattern, $content, $m)) {
Please notice I use Mollie module PS version: 3.4.6
Send you an email with the file.
Ok, the pattern there is:
$pattern = '#\W((abstract\s+)?class|interface)\s+(?P' . $this->display(__FILE__, 'views/templates/front/classname.tpl') . basename($file, '.php').'(?:Core)?)'.'(?:\s+extends\s+'.$namespacePattern.'[a-z][a-z0-9_]*)?(?:\s+implements\s+'.$namespacePattern.'[a-z][\\a-z0-9_]*(?:\s*,\s*'.$namespacePattern.'[a-z][\\a-z0-9_]*)*)?\s*\{#i';
That's not from our library. I'm not sure what we can do here.
Where is it from? I can see it in the library.
https://github.com/mollie/PrestaShop/blob/master/mollie.php#L5403
Oh I must have missed that one!
Expected behavior
Opening the module from the BO causes this error to be shown. We found this error in ThirtyBees 1.1.0 but expect it also to be happening in Prestashop.
Actual behavior
Warning op lijn 5392 in bestand /var/www/vhosts/shopurl.com/httpdocs/modules/mollie/mollie.php [2] preg_match(): Compilation failed: syntax error in subpattern name (missing terminator) at offset 40
Steps to reproduce the behavior
Disable debugging mode under caching (advanced parameters -> performance)
Environment