From 3c39be0b9ae994b84920c5a4a3df57b8dfe918dc Mon Sep 17 00:00:00 2001 From: Landrok Date: Wed, 31 Aug 2016 15:46:05 +0200 Subject: [PATCH] Fix a warning When a template is modified, a static callback emits this warning: ```Warning: preg_replace_callback() [function.preg-replace-callback]: Requires argument 2, 'self::single_path_replace', to be a valid callback``` --- inc/rain.tpl.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/rain.tpl.class.php b/inc/rain.tpl.class.php index b00d511..1446012 100755 --- a/inc/rain.tpl.class.php +++ b/inc/rain.tpl.class.php @@ -738,7 +738,7 @@ protected function path_replace( $html, $tpl_basedir ){ $tags = array_intersect( array( "form" ), self::$path_replace_list ); $exp[] = '/<(' . join( '|', $tags ) . ')(.*?)(action)="(' . $url . ')"/i'; - return preg_replace_callback( $exp, 'self::single_path_replace', $html ); + return preg_replace_callback( $exp, array($this, 'single_path_replace'), $html ); } else