Project

General

Profile

Actions

Bug #8637

closed

field type select_source returns eval warnings if empty on pkg_edit.php

Added by Marcello Silva Coutinho over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Web Interface
Target version:
Start date:
07/11/2018
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.4.4
Affected Architecture:

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

Actions

Also available in: Atom PDF