[Tickets #14868] text_diff_renderer_inline calls itself, making subclassing impossible

noreply at bugs.horde.org noreply at bugs.horde.org
Tue Oct 23 09:40:54 UTC 2018


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: https://bugs.horde.org/ticket/14868
------------------------------------------------------------------------------
  Ticket             | 14868
  Created By         | mrten_horde at ii.nl
  Summary            | text_diff_renderer_inline calls itself, making
                     | subclassing impossible
  Queue              | Horde Framework Packages
  Type               | Bug
  State              | Unconfirmed
  Priority           | 1. Low
  Milestone          |
  Patch              | 1
  Owners             |
------------------------------------------------------------------------------


mrten_horde at ii.nl (2018-10-23 09:40) wrote:

If you want to use another _encode function in a subclass of  
Horde_Text_Diff_Renderer_Inline you can subclass it. But on line ~160  
the class makes a new instantiation of itself, thereby nullifying the  
original subclass.

Small patch:

@@ -158,7 +158,8 @@
          }

          /* Get the diff in inline format. */
-        $renderer = new Horde_Text_Diff_Renderer_inline
+        $class = static::class;
+        $renderer = new $class





More information about the bugs mailing list