We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -3,15 +3,15 @@ |
||
3 | 3 | <?php |
4 | 4 | // if the column has been cast to Carbon or Date (using attribute casting) |
5 | 5 | // get the value as a date string |
6 | - if ( isset($entry) && ($entry->{$field['start_name']} instanceof \Carbon\Carbon || $entry->{$field['start_name']} instanceof \Jenssegers\Date\Date) ) { |
|
7 | - $start_name = $entry->{$field['start_name']}->format( 'Y-m-d H:i:s' ); |
|
6 | + if (isset($entry) && ($entry->{$field['start_name']} instanceof \Carbon\Carbon || $entry->{$field['start_name']} instanceof \Jenssegers\Date\Date)) { |
|
7 | + $start_name = $entry->{$field['start_name']}->format('Y-m-d H:i:s'); |
|
8 | 8 | } else { |
9 | 9 | $start_name = null; |
10 | 10 | } |
11 | 11 | |
12 | 12 | //Do the same as the above but for the range end field |
13 | - if ( isset($entry) && ($entry->{$field['end_name']} instanceof \Carbon\Carbon || $entry->{$field['end_name']} instanceof \Jenssegers\Date\Date) ) { |
|
14 | - $end_name = $entry->{$field['end_name']}->format( 'Y-m-d H:i:s' ); |
|
13 | + if (isset($entry) && ($entry->{$field['end_name']} instanceof \Carbon\Carbon || $entry->{$field['end_name']} instanceof \Jenssegers\Date\Date)) { |
|
14 | + $end_name = $entry->{$field['end_name']}->format('Y-m-d H:i:s'); |
|
15 | 15 | } else { |
16 | 16 | $end_name = null; |
17 | 17 | } |