private function CSSmin::do_raise_php_limits in Advanced CSS/JS Aggregation 6
Same name and namespace in other branches
- 8.2 advagg_css_minify/yui/CSSMin.inc \CSSmin::do_raise_php_limits()
- 8.3 advagg_css_minify/yui/CSSMin.inc \CSSmin::do_raise_php_limits()
Try to configure PHP to use at least the suggested minimum settings
1 call to CSSmin::do_raise_php_limits()
- CSSmin::run in advagg_css_compress/
yui/ CSSMin.inc - Minify a string of CSS
File
- advagg_css_compress/
yui/ CSSMin.inc, line 191
Class
Code
private function do_raise_php_limits() {
$php_limits = array(
'memory_limit' => $this->memory_limit,
'max_execution_time' => $this->max_execution_time,
'pcre.backtrack_limit' => $this->pcre_backtrack_limit,
'pcre.recursion_limit' => $this->pcre_recursion_limit,
);
// If current settings are higher respect them.
foreach ($php_limits as $name => $suggested) {
$current = $this
->normalize_int(ini_get($name));
// memory_limit exception: allow -1 for "no memory limit".
if ($current > -1 && ($suggested == -1 || $current < $suggested)) {
ini_set($name, $suggested);
}
}
}