From ffdc14e8890a7d82120ae19e472424e569c9cb6e Mon Sep 17 00:00:00 2001 From: Ioannis Igoumenos Date: Mon, 13 Dec 2021 09:03:05 +0200 Subject: Fix PHP Warning: Undefined array key Fixes #775 Signed-off-by: Damien Regad Changes to original commit: - use $key variable instead of calling key() function again - remove unnecessary `@` operator. Signed-off-by: Damien Regad --- adodb-xmlschema03.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'adodb-xmlschema03.inc.php') diff --git a/adodb-xmlschema03.inc.php b/adodb-xmlschema03.inc.php index ba7500d0..ca68962a 100644 --- a/adodb-xmlschema03.inc.php +++ b/adodb-xmlschema03.inc.php @@ -585,8 +585,11 @@ class dbTable extends dbObject { // Option has an argument. if( is_array( $opt ) ) { $key = key( $opt ); - $value = $opt[key( $opt )]; - @$fldarray[$field_id][$key] .= $value; + $value = $opt[$key]; + if(!isset($fldarray[$field_id][$key])) { + $fldarray[$field_id][$key] = ""; + } + $fldarray[$field_id][$key] .= $value; // Option doesn't have arguments } else { $fldarray[$field_id][$opt] = $opt; -- cgit v1.3