diff options
| author | Ioannis Igoumenos <ioigoume@admin.grnet.gr> | 2021-12-13 09:03:05 +0200 |
|---|---|---|
| committer | Damien Regad <dregad@mantisbt.org> | 2022-01-02 00:24:42 +0100 |
| commit | ffdc14e8890a7d82120ae19e472424e569c9cb6e (patch) | |
| tree | 3d6d52f9f4293633d516536b5038848427ba376f /adodb-xmlschema03.inc.php | |
| parent | e97474d918a889dcbfe294a7c8957e4a9c617d36 (diff) | |
| download | adodb-ffdc14e8890a7d82120ae19e472424e569c9cb6e.tar.gz adodb-ffdc14e8890a7d82120ae19e472424e569c9cb6e.tar.bz2 adodb-ffdc14e8890a7d82120ae19e472424e569c9cb6e.zip | |
Fix PHP Warning: Undefined array key
Fixes #775
Signed-off-by: Damien Regad <dregad@mantisbt.org>
Changes to original commit:
- use $key variable instead of calling key() function again
- remove unnecessary `@` operator.
Signed-off-by: Damien Regad <dregad@mantisbt.org>
Diffstat (limited to 'adodb-xmlschema03.inc.php')
| -rw-r--r-- | adodb-xmlschema03.inc.php | 7 |
1 files changed, 5 insertions, 2 deletions
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; |
