| @@ -295,9 +295,9 @@ | ||
| 295 | 295 | $caps = FrmAppHelper::frm_capabilities( 'pro_only' ); |
| 296 | 296 | $roles = get_editable_roles(); |
| 297 | 297 | $settings = new FrmSettings(); |
| 298 | 298 | foreach ( $caps as $cap => $cap_desc ) { |
| 299 | - $cap_roles = (array) ( $settings->$cap ?? 'administrator' ); | |
| 299 | + $cap_roles = (array) ( isset( $settings->$cap ) ? $settings->$cap : 'administrator' ); | |
| 300 | 300 | |
| 301 | 301 | // Make sure administrators always have permissions. |
| 302 | 302 | if ( ! in_array( 'administrator', $cap_roles, true ) ) { |
| 303 | 303 | array_push( $cap_roles, 'administrator' ); |
| @@ -551,9 +551,9 @@ | ||
| 551 | 551 | // If the last check was invalid, we don't need to check again. |
| 552 | 552 | return true; |
| 553 | 553 | } |
| 554 | 554 | |
| 555 | - $checked_time = $last_checked['time'] ?? false; | |
| 555 | + $checked_time = isset( $last_checked['time'] ) ? $last_checked['time'] : false; | |
| 556 | 556 | $time_ago = gmdate( 'Y-m-d H:i:s', strtotime( '-' . $time ) ); |
| 557 | 557 | return $checked_time && $checked_time > $time_ago; |
| 558 | 558 | } |
| 559 | 559 | |