Fix deprecated usage of str_contains

This commit is contained in:
eraseyourknees committed 2022-09-07 01:03:23 +02:00
1 parent a3c0065706
commit 749fd65769
2 files changed
+6 -3

No files matched your search

+1 -1
View File
@@ -16,7 +16,7 @@ limitations under the License.
*/ */
function uupApiVersion() { function uupApiVersion() {
return '1.35.1'; return '1.36.0-dev';
} }
require_once dirname(__FILE__).'/auths.php'; require_once dirname(__FILE__).'/auths.php';
+5 -2
View File
@@ -147,8 +147,11 @@ function uupApiIsServer($skuId) {
} }
function uupApiBuildMajor($build) { function uupApiBuildMajor($build) {
if(!str_contains($build, '.')) { if($build == null)
return null;
if(!str_contains($build, '.'))
return intval($build); return intval($build);
}
return intval(explode('.', $build)[0]); return intval(explode('.', $build)[0]);
} }