mirror of
https://github.com/mrclay/minify.git
synced 2025-08-30 17:19:54 +02:00
Check if each variable is in the symbol table.
Delete if not before passing into compact.
This commit is contained in:
@@ -80,6 +80,11 @@ class App extends Container
|
|||||||
};
|
};
|
||||||
$varNames = array_map($prefixer, $propNames);
|
$varNames = array_map($prefixer, $propNames);
|
||||||
|
|
||||||
|
$varDefinedChecker = function ($name) {
|
||||||
|
return array_key_exists($name, get_defined_vars());
|
||||||
|
};
|
||||||
|
$varNames = array_filter($varNames, $varDefinedChecker);
|
||||||
|
|
||||||
$vars = compact($varNames);
|
$vars = compact($varNames);
|
||||||
|
|
||||||
foreach ($varNames as $varName) {
|
foreach ($varNames as $varName) {
|
||||||
|
Reference in New Issue
Block a user