Parse Error on version 1.1
-
Hey,
Thanks for the great project.
There seems to be an issue with the latest version of the plugin.
parse error: <path>/main.less on line 1
This error always occurs, independent of the content.
After digging through the source code, there seems to be an issue with the latest update, especially the formatting of the
lessc.inc.php
file.It seems like your formatting tool also formatted string contents breaking the less parser.
One example is
lessc.inc.php:2731
Content version 1.0
protected function mediaExpression(&$out) { $s = $this->seek(); $value = null; if ($this->literal("(") && $this->keyword($feature) && ($this->literal(":") && $this->expression($value) || true) && $this->literal(")")) { $out = array("mediaExp", $feature); if ($value) $out[] = $value; return true; } elseif ($this->variable($variable)) { $out = array('variable', $variable); return true; } $this->seek($s); return false; }
However on version 1.1 we have
protected function mediaExpression( &$out ) { $s = $this->seek(); $value = null; if ( $this->literal( "( " ) && $this->keyword( $feature ) && ( $this->literal( ":" ) && $this->expression( $value ) || true ) && $this->literal( " )" ) ) { $out = array( "mediaExp", $feature ); if ( $value ) $out[] = $value; return true; } elseif ( $this->variable( $variable ) ) { $out = array( 'variable', $variable ); return true; } $this->seek( $s ); return false; }
Note here the
$this->literal( "( " )
with the extra space.This is just one example, there are bunch more of them.
—
For people having the same issue, a workaround is to download the WP Rollback plugin (or something similar) and downgrade the plugin to version
1.0
until the problem is resolved. (Edit: Do not forget to disable auto update, otherwise it will update automatically)
- The topic ‘Parse Error on version 1.1’ is closed to new replies.