From 9cb64d48e36591027a8a47bdd474fd4bccf87dc6 Mon Sep 17 00:00:00 2001 From: Jackson Date: Tue, 30 Jun 2015 11:29:26 +1200 Subject: [PATCH] Define function as static (line 59) Not defining function on line 59 as static triggers php error: [Strict Notice] call_user_func() expects parameter 1 to be a valid callback, non-static method Page::ShortcodeColumns() should not be called statically Note: PHP 5.5.12 --- docs/en/02_Developer_Guides/05_Extending/04_Shortcodes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/02_Developer_Guides/05_Extending/04_Shortcodes.md b/docs/en/02_Developer_Guides/05_Extending/04_Shortcodes.md index 42484385d..91e22794a 100644 --- a/docs/en/02_Developer_Guides/05_Extending/04_Shortcodes.md +++ b/docs/en/02_Developer_Guides/05_Extending/04_Shortcodes.md @@ -56,7 +56,7 @@ First we need to define a callback for the shortcode. 'MyShortCodeMethod' => 'HTMLText' ); - public function MyShortCodeMethod($arguments, $content = null, $parser = null, $tagName) { + public static function MyShortCodeMethod($arguments, $content = null, $parser = null, $tagName) { return "" . $tagName . " " . $content . "; " . count($arguments) . " arguments."; } }