Skip to content

Commit

Permalink
fix: warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dr5hn committed Aug 8, 2023
1 parent c228a43 commit 15aaac9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/export_csv.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
// Loop through the associative array.
foreach ($csc as $row) :
// Update timezones to make readable
if(is_array($row['timezones'])) {
if(is_array($row['timezones']) && !empty($row['timezones'])) {
$row['timezones'] = json_encode($row['timezones']);
$row['timezones'] = preg_replace('/"/', "'", $row['timezones']);
$row['timezones'] = preg_replace("/'([a-zA-Z]+[a-zA-Z0-9_]*)':/", '$1:', $row['timezones']);
Expand Down

0 comments on commit 15aaac9

Please sign in to comment.