We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

RSS widget with php 7.3 | Forum

Norias
Norias Aug 8 '19

Maybe this can be useful to somebody.


Php 7.3 is using PCRE2, so now the hyphen needs to be escaped in regex patterns.


preg_match('/[\w-.]+/', ''); // this will not work in PHP7.3 

preg_match('/[\w\-.]+/', ''); // the hyphen need to be escaped


You have to change the line 40 of /ow_utilities/validator.php to be able to use rss in widgets (and maybe elsewhere) again with php 7.3.


new line with hyphen escaped :


const URL_PATTERN = '/^(http(s)?:\/\/)?((\d+\.\d+\.\d+\.\d+)|(([\w\-]+\.)+([a-z,A-Z][\w\-]*)))(:[1-9][0-9]*)?(\/?([\w\-.\,\/:%+@&*=~]+[\w\- \,.\/?:%+@&=*|]*)?)?(#(.*))?$/';


The Forum post is edited by Norias Aug 18 '19