From 9536ba2abbf2363af83adc178bb5e273a935ba39 Mon Sep 17 00:00:00 2001 From: Ned Palacios Date: Thu, 4 Apr 2024 09:35:46 +0800 Subject: [PATCH] fix(auto-updater): improve updating mechanism --- inc/auto-updater.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/auto-updater.php b/inc/auto-updater.php index 3def2aa..6e8b10e 100644 --- a/inc/auto-updater.php +++ b/inc/auto-updater.php @@ -19,9 +19,9 @@ function automatic_gh_updates($data) { if($file) { // Strip the version number of any non-numerical characters - $update = preg_replace('/[^0-9.].*/', '', $file->tag_name); + $update = preg_replace('/release-/', '', $file->tag_name); // Only return a response if the new version number is higher than the current version - if($update > $current) { + if((int) $update > (int) $current) { $data->response[$theme] = array( 'theme' => $theme, 'new_version' => $update,