Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Got the following on recent upgrade from 2.7 to 2.8
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/site/public_html/sites/all/modules/advagg/advagg_js_compress/advagg_js_compress.advagg.inc on line 453
Parse error: syntax error, unexpected T_STRING in /home/site/public_html/sites/all/modules/advagg/advagg_js_compress/advagg_js_compress.advagg.inc on line 453
Looks like a typo here
function advagg_js_compress_jsqueeze(&$contents, $log_errors = TRUE) {
$contents_before = $contents;
// Only include jshrink.inc if the Patchwork\JSqueeze class doesn't exist.
if (!class_exists('Patchwork\JSqueeze')) { <<<<<<<--------------
include drupal_get_path('module', 'advagg_js_compress') . '/jsqueeze.inc';
$nesting_level = ini_get('xdebug.max_nesting_level');
if (!empty($nesting_level) && $nesting_level < 200) {
ini_set('xdebug.max_nesting_level', 200);
}
}
Comments
Comment #1
thedosmann CreditAttribution: thedosmann commentedComment #2
thedosmann CreditAttribution: thedosmann commentedComment #3
mikeytown2 CreditAttribution: mikeytown2 commented#2477085: Unexpected character in input
Update to php 5.3+ or get the latest dev as it is fixed in there.
Comment #4
thedosmann CreditAttribution: thedosmann commentedMy server php is at 5.2.17. Going to 5.3+ would be a major build upgrade. I floated back to advagg 2.7 for now. Will future updates require php 5.3+?
Comment #5
mikeytown2 CreditAttribution: mikeytown2 commentedNo they will not require 5.3. The current dev of advagg works with php 5.2.
Comment #6
thedosmann CreditAttribution: thedosmann commentedThanks, and Thank You for your work on this module.