File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ public function parse($query)
205205
206206 $ this ->parsedQuery ['benchmark ' ] = array (
207207 'elapsed_time ' => $ benchmark ->elapsed_time ('jsondb_query_parse_start ' , 'jsondb_query_parse_end ' ),
208- 'memory_usage ' => $ benchmark ->memory_usage ()
208+ 'memory_usage ' => $ benchmark ->memory_usage (' jsondb_query_parse_start ' , ' jsondb_query_parse_end ' )
209209 );
210210
211211 return $ this ->parsedQuery ;
@@ -411,8 +411,11 @@ private function _parseOnExtension($clause)
411411 if (count ($ parsedClause ) === 0 ) {
412412 throw new Exception ("JSONDB Query Parse Error: At least one parameter expected for the \"on() \" extension. " );
413413 }
414+ if (count ($ parsedClause ) > 1 ) {
415+ throw new Exception ("JSONDB Query Parse Error: Too much parameters given to the \"on() \" extension, only one required. " );
416+ }
414417
415- return $ parsedClause ;
418+ return $ parsedClause[ 0 ] ;
416419 }
417420
418421 private function _parseLinkExtension ($ clause )
You can’t perform that action at this time.
0 commit comments