File tree Expand file tree Collapse file tree 1 file changed +10
-13
lines changed
Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Original file line number Diff line number Diff line change 33require_once 'includes/notifications.class.php ' ;
44
55
6- ## COMMENTED CODE IS USED TO WRITE TO A FILE, GOOD FOR DEBUGGING
7-
6+ ## TEST WRITING TO A FILE - DEBUGGING
87#$fh = fopen('json_parse.log', 'a+') or die("Error opening output file");
98
109#if ( $fh ) {
1918
2019 if (is_array ($ notifications ->dataArray ))
2120 {
22- foreach ( $ notifications ->dataArray as $ data )
21+ foreach ( $ notifications ->dataArray as $ data )
2322 {
2423 // key used should also be a column in the database
2524 // need additional data simply add it
4443 $ a = array_filter ( $ d , 'strlen ' ); // this will remove emtpy object from causing database insertion issues
4544 $ db ->insert ('notifications ' , $ a );
4645 }
47-
48- echo "Ok " ;
49-
50- } else {
5146
47+ echo "Ok " ;
48+ }
49+ else
50+ {
5251 // Any errors? Let's review in the logs
5352 error_log ("Invalid Array: " . print_r ($ notifications ->dataArray , TRUE ), 0 );
54-
5553 }
5654
57-
5855# fwrite($fh, serialize($notifications->dataArray));
5956# fclose($fh);
60-
61- } else {
57+
58+ }
59+ else
60+ {
6261 error_log ("Invalid Host " , 0 );
6362 }
6463#}
65-
66- ?>
You can’t perform that action at this time.
0 commit comments