[Tickets #14738] Failed asserts in Text_Diff in 'native' engine

noreply at bugs.horde.org noreply at bugs.horde.org
Fri Nov 24 11:19:17 UTC 2017


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

Ticket URL: https://bugs.horde.org/ticket/14738
------------------------------------------------------------------------------
  Ticket             | 14738
  Created By         | cpigott at rapitasystems.com
  Summary            | Failed asserts in Text_Diff in 'native' engine
  Queue              | Horde Framework Packages
  Type               | Bug
  State              | Unconfirmed
  Priority           | 2. Medium
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


cpigott at rapitasystems.com (2017-11-24 11:19) wrote:

So I just upgraded to Horde_Text_Diff 2.2.0, but the native engine is  
spewing out warnings about failed asserts:

PHP Warning:  assert(): assert($y <= $this->seq[$k]) failed in  
<snip>/Horde/Text/Diff/Engine/Native.php on line 199
PHP Warning:  assert(): assert($ypos != $this->seq[$end]) failed in  
<snip>/Horde/Text/Diff/Engine/Native.php on line 239

Some searching brought up a WordPress bug report [1] where they  
backported commit 65f92a [2] and noticed the same issue. They didn't  
really come up with a proper fix themselves - just "reverting" to  
using current() and next() instead of each(). That doesn't seem like a  
proper solution to me - it's still relying on mashing the internal  
array pointer that was why each() was deprecated in the first place,  
but regardless it does the job.

In my searching I also found #4497 [3], which seems like it could be  
related to this issue, despite it being a decade old

[1] https://core.trac.wordpress.org/ticket/41526
[2]  
https://github.com/horde/Text_Diff/commit/65f92a945f3745be2953d2bcc24735e860cf70a7
[3] https://bugs.horde.org/ticket/4997





More information about the bugs mailing list