Skip to content
This repository
Browse code

BUGFIX php-peg E_STRICT fixes

  • Loading branch information...
commit 0dd4d4386e981c454136fb7d739cb3c67f635961 1 parent 2b8e14f
Sean Harvey authored April 12, 2012

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  thirdparty/php-peg/Compiler.php
6  thirdparty/php-peg/Compiler.php
@@ -273,7 +273,7 @@ function __construct( $value ) {
273 273
 		parent::__construct( 'literal', "'" . substr($value,1,-1) . "'" );
274 274
 	}
275 275
 
276  
-	function match_code() {
  276
+	function match_code( $value ) {
277 277
 		// We inline single-character matches for speed
278 278
 		if ( !$this->contains_expression() && strlen( eval( 'return '.  $this->value . ';' ) ) == 1 ) {
279 279
 			return $this->match_fail_conditional( 'substr($this->string,$this->pos,1) == '.$this->value, 
@@ -298,7 +298,7 @@ function __construct( $value ) {
298 298
 		parent::__construct('rx', self::escape($value));
299 299
 	}
300 300
 
301  
-	function match_code() {
  301
+	function match_code( $value ) {
302 302
 		return parent::match_code("'{$this->value}'");
303 303
 	}
304 304
 }
@@ -309,7 +309,7 @@ function __construct( $optional ) {
309 309
 	}
310 310
 
311 311
 	/* Call recursion indirectly */
312  
-	function match_code() {
  312
+	function match_code( $value ) {
313 313
 		$code = parent::match_code( '' ) ;
314 314
 		return $this->value ? $code->replace( array( 'FAIL' => NULL )) : $code ;
315 315
 	}

0 notes on commit 0dd4d43

Please sign in to comment.
Something went wrong with that request. Please try again.