mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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
This commit is contained in:
parent
dcd378c539
commit
9cb64d48e3
@ -56,7 +56,7 @@ First we need to define a callback for the shortcode.
|
|||||||
'MyShortCodeMethod' => 'HTMLText'
|
'MyShortCodeMethod' => 'HTMLText'
|
||||||
);
|
);
|
||||||
|
|
||||||
public function MyShortCodeMethod($arguments, $content = null, $parser = null, $tagName) {
|
public static function MyShortCodeMethod($arguments, $content = null, $parser = null, $tagName) {
|
||||||
return "<em>" . $tagName . "</em> " . $content . "; " . count($arguments) . " arguments.";
|
return "<em>" . $tagName . "</em> " . $content . "; " . count($arguments) . " arguments.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user