File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public function fromFileCommand($file)
41
41
$ conn ->truncate ($ config ['table ' ]);
42
42
$ this ->outputLine ('Emptied database table " ' . $ config ['table ' ] . '" ' );
43
43
}
44
- foreach ($ config ['entries ' ] as $ entry ) {
44
+ foreach ($ config ['entries ' ] ?? [] as $ entry ) {
45
45
if ($ mode === 'update ' && isset ($ entry ['uid ' ])) {
46
46
$ identifiers = ['uid ' => $ entry ['uid ' ]];
47
47
if ($ conn ->count ('uid ' , $ config ['table ' ], $ identifiers )) {
@@ -67,7 +67,7 @@ public function fromFileCommand($file)
67
67
$ conn ->exec_TRUNCATEquery ($ config ['table ' ]);
68
68
$ this ->outputLine ('Emptied database table " ' . $ config ['table ' ] . '" ' );
69
69
}
70
- foreach ($ config ['entries ' ] as $ entry ) {
70
+ foreach ($ config ['entries ' ] ?? [] as $ entry ) {
71
71
if ($ mode === 'update ' && isset ($ entry ['uid ' ])) {
72
72
$ condition = sprintf ('uid = %d ' , $ entry ['uid ' ]);
73
73
if ($ conn ->exec_SELECTcountRows ('uid ' , $ config ['table ' ], $ condition )) {
You can’t perform that action at this time.
0 commit comments