Fix deprecated usage of str_contains

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

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';

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]);
} }