Skip to content

Commit 33a6b16

Browse files
author
Felix Arntz
committed
Adjust PHP 5.2-incompatible code.
1 parent 63d1c3d commit 33a6b16

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/wpephpcompat.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,11 @@ public function start_test() {
207207
$scan_results .= __( 'Name', 'php-compatibility-checker' ) . ': ' . $directory->post_title . "\n\n";
208208

209209
// Keep track of the number of times we've attempted to scan the plugin.
210-
$count = get_post_meta( $directory->ID, 'count', true ) ?: 1;
210+
$count = (int) get_post_meta( $directory->ID, 'count', true );
211+
if ( ! $count ) {
212+
$count = 1;
213+
}
214+
211215
$this->debug_log( 'Attempted scan count: ' . $count );
212216

213217
if ( $count > 2 ) { // If we've already tried twice, skip it.

0 commit comments

Comments
 (0)