From d0faf29c9fb5174bed9dc889850537b58348eb07 Mon Sep 17 00:00:00 2001 From: Shish Date: Fri, 18 Aug 2023 17:41:47 +0100 Subject: [PATCH] hide deprecation warnings --- composer.lock | 8 ++++---- core/basepage.php | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index 47040b1b..1af2c04d 100644 --- a/composer.lock +++ b/composer.lock @@ -1043,12 +1043,12 @@ "source": { "type": "git", "url": "https://github.com/shish/php-css.git", - "reference": "d851161c33bcd8b3809d16c08c285f27123c79b6" + "reference": "a7f96a6c1ef1c9a8a35257e5f3e1089caa80c959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/shish/php-css/zipball/d851161c33bcd8b3809d16c08c285f27123c79b6", - "reference": "d851161c33bcd8b3809d16c08c285f27123c79b6", + "url": "https://api.github.com/repos/shish/php-css/zipball/a7f96a6c1ef1c9a8a35257e5f3e1089caa80c959", + "reference": "a7f96a6c1ef1c9a8a35257e5f3e1089caa80c959", "shasum": "" }, "require": { @@ -1117,7 +1117,7 @@ "support": { "source": "https://github.com/shish/php-css/tree/master" }, - "time": "2023-08-18T15:28:52+00:00" + "time": "2023-08-18T16:35:10+00:00" }, { "name": "webonyx/graphql-php", diff --git a/core/basepage.php b/core/basepage.php index 27a660d3..36a56681 100644 --- a/core/basepage.php +++ b/core/basepage.php @@ -393,6 +393,9 @@ class BasePage $css_md5 = md5(serialize($css_files)); $css_cache_file = data_path("cache/style/{$theme_name}.{$css_latest}.{$css_md5}.css"); if (!file_exists($css_cache_file)) { + // the CSS minifier causes a bunch of deprecation warnings, + // so we turn off error reporting while it runs + $old_error_level = error_reporting(0); $parser = new Parser(); foreach($css_files as $file) { $parser->append($file); @@ -409,6 +412,7 @@ class BasePage 'legacy_rendering' => true, // turn nested CSS into regular ]); $renderer->save($element, $css_cache_file); + error_reporting($old_error_level); } return $css_cache_file;