Flyspray - The bug killer!

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category Backend/Core
  • Assigned To
    peterdd
  • Operating System All
  • Severity High
  • Priority Medium
  • Reported Version 1.0-rc9
  • Due in Version 1.0-rc10
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Flyspray - The bug killer!
Opened by peterdd - 10.02.2021
Last edited by peterdd - 02.03.2021

FS#2624 - fatal error with PHP8 and syntax_plugin html (ckeditor)

The used get_class_methods($classname) function now throws exception in PHP8 when the class does not exists (or couldn’t be found).

grep -rin4 get_class_methods 
class.tpl.php-1006-	public static function render($text, $type = null, $id = null, $instructions = null)
class.tpl.php-1007-	{
class.tpl.php-1008-		global $conf;
class.tpl.php-1009-
class.tpl.php:1010:		$methods = get_class_methods($conf['general']['syntax_plugin'] . '_TextFormatter');
class.tpl.php-1011-		$methods = is_array($methods) ? $methods : array();
class.tpl.php-1012-
class.tpl.php-1013-		if (in_array('render', $methods)) {
class.tpl.php-1014-			return call_user_func(array($conf['general']['syntax_plugin'] . '_TextFormatter', 'render'),
--
class.tpl.php-1036-    public static function textarea($name, $rows, $cols, $attrs = null, $content = null)
class.tpl.php-1037-    {
class.tpl.php-1038-        global $conf;
class.tpl.php-1039-
class.tpl.php:1040:        if (@in_array('textarea', get_class_methods($conf['general']['syntax_plugin'] . '_TextFormatter'))) {
class.tpl.php-1041-            return call_user_func(array($conf['general']['syntax_plugin'] . '_TextFormatter', 'textarea'),
class.tpl.php-1042-                                  $name, $rows, $cols, $attrs, $content);
class.tpl.php-1043-        }
class.tpl.php-1044-

Previously it just returned null as also documented on php.net! :-/
https://www.php.net/manual/en/function.get-class-methods :

In case of an error, it returns null.

So either php guys update their source code or documentation. Netherless a workaround is needed.

Closed by  peterdd
02.03.2021 04:23
Reason for closing:  Fixed in devel

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing