Skip to content

Commit 50646f9

Browse files
authored
Merge pull request #2 from batonac/patch-1
Fix: return GET_LOCK query as numeric array
2 parents a06b933 + 9a8725a commit 50646f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Controller.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,8 +602,8 @@ public static function wp2staticProcessQueue() : void {
602602

603603
foreach ( $jobs as $job ) {
604604
$lock = $wpdb->prefix . '.wp2static_jobs.' . $job->job_type;
605-
$query = "SELECT GET_LOCK('$lock', 30) AS lck";
606-
$locked = intval( $wpdb->get_row( $query )->lck );
605+
$query = "SELECT GET_LOCK('$lock', 30)";
606+
$locked = intval( $wpdb->get_row( $query, ARRAY_N )[0] );
607607
if ( ! $locked ) {
608608
WsLog::l( "Failed to acquire \"$lock\" lock." );
609609
return;

0 commit comments

Comments
 (0)