hide deprecation warnings
This commit is contained in:
parent
7a4f033cce
commit
d0faf29c9f
2 changed files with 8 additions and 4 deletions
8
composer.lock
generated
8
composer.lock
generated
|
@ -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",
|
||||
|
|
|
@ -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;
|
||||
|
|
Reference in a new issue