This repository was archived by the owner on Feb 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +31
-28
lines changed Expand file tree Collapse file tree 3 files changed +31
-28
lines changed Original file line number Diff line number Diff line change 3434$ key = 0 ;
3535$ curl = new Curl \Curl ();
3636
37- if (false === file_exists (' table.csv ' )) {
38- throw new Exception ('File table.csv not found. Aborting ... ' );
37+ if (false === file_exists (__DIR__ . ' / table.csv ' )) {
38+ throw new Exception ('File ' . __DIR__ . ' / table.csv not found. Aborting ... ' );
3939 return ;
4040}
4141
190190$ i = 0 ;
191191
192192echo PHP_EOL ;
193- echo '############### ' . PHP_EOL ;
194- echo 'Fehlerprotokoll ' . PHP_EOL ;
195- echo '############### ' ;
193+ echo '######### ' . PHP_EOL ;
194+ echo 'Protokoll ' . PHP_EOL ;
195+ echo '######### ' ;
196196echo PHP_EOL ;
197197
198198foreach ($ extractedData as $ key => $ extractedEntry ) {
199199 foreach ($ mdbDatabaseCSVExport as $ key => $ originalEntry ) {
200200 if (!isset ($ originalEntry [5 ]) || !isset ($ originalEntry [7 ])) {
201- echo PHP_EOL . 'Title information missing... ' ;
202201 var_dump ($ originalEntry );
202+ echo PHP_EOL . 'Data seems corrupt, essential fields are unset. Aborting ... ' ;
203+ return ;
203204 }
204205
205206 $ street = preg_replace ('/(\(.*?\))/si ' , '' , $ originalEntry [7 ]);
338339
339340 $ finalData [] = $ extractedEntry ;
340341
342+ echo PHP_EOL . $ extractedEntry ['Titel ' ] . ' finished ' . PHP_EOL ;
343+
341344 break ;
342345 }
343346 }
You can’t perform that action at this time.
0 commit comments