- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
09-25-2025 09:28 AM
found a solution for such error, there is problem with php, which couldn't display the policies and even nat rules due to the following:
Error:
"[php7:error] [pid 662851] [client 10.65.108.4:54080] PHP Fatal error: Uncaught Error: [] operator not supported for strings in /var/www/html/libs/shared.php:4738\nStack trace:\n#0 /var/www/html/bin/SecurityRules.php(597): search_security_policies()\n#1 {main}\n thrown in /var/www/html/libs/shared.php on line 4738, referer: https://10.232.21.200/"
Solution (insert the line before the exact code":
nl -ba /var/www/html/libs/shared.php | sed -n '4680,4760p'
sudo sed -i '4738i if (!isset($rules[$src["rule_lid"]]["tag"]) || !is_array($rules[$src["rule_lid"]]["tag"])) { $rules[$src["rule_lid"]]["tag"] = array(); }' /var/www/html/libs/shared.php
I have successfully resolved this issue.