From f99fcffeb9c94ba0b19ed5324fa1e31e79b7d0ba Mon Sep 17 00:00:00 2001 From: defacer Date: Mon, 28 Feb 2005 00:30:39 +0000 Subject: [PATCH] Fix for bug 2648: call-time pass by reference has been deprecated, the constructor of search_lexer now accepts the parser argument by reference all... one time it's called :) --- lib/searchlib.php | 2 +- mod/forum/lib.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/searchlib.php b/lib/searchlib.php index 4738a09fc36..b793dceed71 100644 --- a/lib/searchlib.php +++ b/lib/searchlib.php @@ -44,7 +44,7 @@ class search_token { class search_lexer extends Lexer{ - function search_lexer($parser){ + function search_lexer(&$parser){ // Call parent constructor. $this->Lexer($parser); diff --git a/mod/forum/lib.php b/mod/forum/lib.php index 0939d875e51..9431e38c947 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -1031,7 +1031,7 @@ function forum_search_posts($searchterms, $courseid, $page=0, $recordsperpage=50 // by the parser, but this should be examined carefully for security implications. $searchstring = str_replace("\\\"","\"",$searchstring); $parser = new search_parser(); - $lexer = new search_lexer(&$parser); + $lexer = new search_lexer($parser); if ($lexer->parse($searchstring)) { $parsearray = $parser->get_parsed_array();