mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-05-05 04:52:47 +02:00
fixes #1948 replace cssmin by minify
- switched from cssmin to matthiasmullie/minify for CSS minification. - the minify lib requires the path-converter lib (from the same author), which has been added as well (in include/minify/path-converter). This change is necessary because cssmin is not compatible with PHP 8.4
This commit is contained in:
36
include/minify/src/Exceptions/PatternMatchException.php
Normal file
36
include/minify/src/Exceptions/PatternMatchException.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Pattern match exception.
|
||||
*
|
||||
* Please report bugs on https://github.com/matthiasmullie/minify/issues
|
||||
*
|
||||
* @author Ere Maijala <ere.maijala@helsinki.fi>
|
||||
* @copyright Copyright (c) 2012, Matthias Mullie. All rights reserved
|
||||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace MatthiasMullie\Minify\Exceptions;
|
||||
|
||||
/**
|
||||
* Pattern Match Exception Class.
|
||||
*
|
||||
* @author Ere Maijala <ere.maijala@helsinki.fi>
|
||||
*/
|
||||
class PatternMatchException extends BasicException
|
||||
{
|
||||
/**
|
||||
* Create an exception from preg_last_error.
|
||||
*
|
||||
* @param string $msg Error message
|
||||
*/
|
||||
public static function fromLastError($msg)
|
||||
{
|
||||
$msg .= ': Error ' . preg_last_error();
|
||||
if (PHP_MAJOR_VERSION >= 8) {
|
||||
$msg .= ' - ' . preg_last_error_msg();
|
||||
}
|
||||
|
||||
return new PatternMatchException($msg);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user