From 6ffbbec689bdadbe0f37820e5b7882c20c40f6f5 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Sat, 12 Oct 2019 15:01:16 +0200 Subject: [PATCH] Improve theme API version retrieval --- lib/Pico.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Pico.php b/lib/Pico.php index 40d736b..f44f42f 100644 --- a/lib/Pico.php +++ b/lib/Pico.php @@ -1100,7 +1100,7 @@ class Pico ); // theme API version - if (preg_match('/^[0-9]+$/', $themeConfig['api_version'])) { + if (is_int($themeConfig['api_version']) || preg_match('/^[0-9]+$/', $themeConfig['api_version'])) { $this->themeApiVersion = (int) $themeConfig['api_version']; } else { $this->themeApiVersion = 0;