Closed Pinkbyte closed 6 years ago
Hello.
All preg_replace calls with the /e modifier must be replaced with preg_replace_callback for good work on PHP 7. This is a lot of lines of code in the script.
We will not do this work until we need to migrate to PHP 7.
You can do this work if you have time. After that it will be possible to merge the branches. Thank you!
Problem: with PHP 7 showing some BGP info and routes does not work with such message in error.log:
[client 10.0.0.213:51788] AH01071: Got error 'PHP message: PHP Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /var/www/lg/htdocs/index.php on line 914\n'
Proposed fix:
Replace call of preg_replace with unsupported modifier with preg_replace_callback in Mikrotik section
Unfortunately i can not test similar fixes for other router types(because i did not have them), so i did work only for Mikrotik related stuff