Bug #8637
closedfield type select_source returns eval warnings if empty on pkg_edit.php
100%
Description
pkg_edit.php shows eval erros while tries to fetch a select_source type field that has an empty source
For example, If there is no limiters created by syadmin, config.xml has a default value < dnshaper >< /dnshaper >
if I have a field type "select_source" with < source >< ![CDATA[$config['dnshaper']['queue']]] >< /source >, the eval code under pkg_edit.php will return parse and exception errors with php 7.2.
Warning: Illegal string offset 'queue' in /usr/local/www/pkg_edit.php(911) : eval()'d code on line 1 Fatal error: Uncaught Error: Cannot create references to/from string offsets in /usr/local/www/pkg_edit.php(911) : eval()'d code:1 Stack trace: #0 /usr/local/www/pkg_edit.php(911): eval() #1 {main} thrown in /usr/local/www/pkg_edit.php(911) : eval()'d code on line 1 PHP ERROR: Type: 1, File: /usr/local/www/pkg_edit.php(911) : eval()'d code, Line: 1, Message: Uncaught Error: Cannot create references to/from string offsets in /usr/local/www/pkg_edit.php(911) : eval()'d code:1 Stack trace: #0 /usr/local/www/pkg_edit.php(911): eval() #1 {main} thrown
Updated by Marcello Silva Coutinho over 6 years ago
Updated by Anonymous over 6 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Merged 07/17/18