PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / 4.7.0
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance v4.7.0
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
wp-optimize / vendor / matthiasmullie / minify / src / Exceptions / PatternMatchException.php

PatternMatchException.php in WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance 4.7.0, at vendor/matthiasmullie/minify/src/Exceptions/PatternMatchException.php

37 lines 828 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Pattern match exception.
5 *
6 * Please report bugs on https://github.com/matthiasmullie/minify/issues
7 *
8 * @author Ere Maijala <[email protected]>
9 * @copyright Copyright (c) 2012, Matthias Mullie. All rights reserved
10 * @license MIT License
11 */
12
13 namespace MatthiasMullie\Minify\Exceptions;
14
15 /**
16 * Pattern Match Exception Class.
17 *
18 * @author Ere Maijala <[email protected]>
19 */
20 class PatternMatchException extends BasicException
21 {
22 /**
23 * Create an exception from preg_last_error.
24 *
25 * @param string $msg Error message
26 */
27 public static function fromLastError($msg)
28 {
29 $msg .= ': Error ' . preg_last_error();
30 if (PHP_MAJOR_VERSION >= 8) {
31 $msg .= ' - ' . preg_last_error_msg();
32 }
33
34 return new PatternMatchException($msg);
35 }
36 }
37