From 749fd657692c919b8866cdfbde1d4d1170cb7c0e Mon Sep 17 00:00:00 2001 From: eraseyourknees <112027564+eraseyourknees@users.noreply.github.com> Date: Wed, 7 Sep 2022 01:03:23 +0200 Subject: [PATCH] Fix deprecated usage of str_contains --- shared/main.php | 2 +- shared/utils.php | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/shared/main.php b/shared/main.php index 26ee88e..84504c6 100644 --- a/shared/main.php +++ b/shared/main.php @@ -16,7 +16,7 @@ limitations under the License. */ function uupApiVersion() { - return '1.35.1'; + return '1.36.0-dev'; } require_once dirname(__FILE__).'/auths.php'; diff --git a/shared/utils.php b/shared/utils.php index 0c97bd6..0275a47 100644 --- a/shared/utils.php +++ b/shared/utils.php @@ -147,8 +147,11 @@ function uupApiIsServer($skuId) { } function uupApiBuildMajor($build) { - if(!str_contains($build, '.')) { + if($build == null) + return null; + + if(!str_contains($build, '.')) return intval($build); - } + return intval(explode('.', $build)[0]); }