preg_replace() error
Posted: Thu Jul 12, 2018 12:43 pm
Hello CMSMS friends
My provider is upgrading PHP to 7.2 and some of my CMSMS installations, which otherwise work well, stop displaying photo galleries.
Error message is this (it only displays under PHP 7.1):
Warning: preg_replace() [function.preg-replace.php]: The /e modifier is no longer supported, use preg_replace_callback instead in /home/zugergra/www/bakoro.ch/lib/html_entity_decode_php4.php on line 306
Warning: preg_replace() [function.preg-replace.php]: The /e modifier is no longer supported, use preg_replace_callback instead in /home/zugergra/www/bakoro.ch/lib/html_entity_decode_php4.php on line 307
So I tried to change that in html_entity_decode_php4.php
When I change just the two "preg_replace"... to "preg_replace_callback"... the gallery starts working again, only that it displays another error on top regarding the rest of that code. So I took that whole part of the code from the html_entity_decode_php4.php that is used in the actual CMSMS 2.x but it caused a whole lot of other errors.
Has someone a suggestion what I can try to change on those two lines of PHP so the errors disappear?
My CMSMS installations are 1.11.11 or 1.11.9, Gallery Module 1.6 or 2.0.3 and the like. Thing is, updating CMSMS is not possible because many custom adaption were originally made that would all have to be made again, websites are non-profit so we have to solve it as easy as possible. As it is a minor PHP problem, better changing that specific code only.
Thanks for any suggestion,
Thom
My provider is upgrading PHP to 7.2 and some of my CMSMS installations, which otherwise work well, stop displaying photo galleries.
Error message is this (it only displays under PHP 7.1):
Warning: preg_replace() [function.preg-replace.php]: The /e modifier is no longer supported, use preg_replace_callback instead in /home/zugergra/www/bakoro.ch/lib/html_entity_decode_php4.php on line 306
Warning: preg_replace() [function.preg-replace.php]: The /e modifier is no longer supported, use preg_replace_callback instead in /home/zugergra/www/bakoro.ch/lib/html_entity_decode_php4.php on line 307
So I tried to change that in html_entity_decode_php4.php
When I change just the two "preg_replace"... to "preg_replace_callback"... the gallery starts working again, only that it displays another error on top regarding the rest of that code. So I took that whole part of the code from the html_entity_decode_php4.php that is used in the actual CMSMS 2.x but it caused a whole lot of other errors.
Has someone a suggestion what I can try to change on those two lines of PHP so the errors disappear?
My CMSMS installations are 1.11.11 or 1.11.9, Gallery Module 1.6 or 2.0.3 and the like. Thing is, updating CMSMS is not possible because many custom adaption were originally made that would all have to be made again, websites are non-profit so we have to solve it as easy as possible. As it is a minor PHP problem, better changing that specific code only.
Thanks for any suggestion,
Thom