Ticket #40109: 40109-string-asserts.patch
File 40109-string-asserts.patch, 2.8 KB (added by , 8 years ago) |
---|
-
src/wp-includes/Text/Diff/Engine/native.php
330 330 $i = 0; 331 331 $j = 0; 332 332 333 assert( 'count($lines) == count($changed)');333 assert( count($lines) == count($changed) ); 334 334 $len = count($lines); 335 335 $other_len = count($other_changed); 336 336 … … 351 351 } 352 352 353 353 while ($i < $len && ! $changed[$i]) { 354 assert( '$j < $other_len && ! $other_changed[$j]');354 assert( $j < $other_len && ! $other_changed[$j] ); 355 355 $i++; $j++; 356 356 while ($j < $other_len && $other_changed[$j]) { 357 357 $j++; … … 383 383 while ($start > 0 && $changed[$start - 1]) { 384 384 $start--; 385 385 } 386 assert( '$j > 0');386 assert( $j > 0 ); 387 387 while ($other_changed[--$j]) { 388 388 continue; 389 389 } 390 assert( '$j >= 0 && !$other_changed[$j]');390 assert( $j >= 0 && !$other_changed[$j] ); 391 391 } 392 392 393 393 /* Set CORRESPONDING to the end of the changed run, at the … … 408 408 $i++; 409 409 } 410 410 411 assert( '$j < $other_len && ! $other_changed[$j]');411 assert( $j < $other_len && ! $other_changed[$j] ); 412 412 $j++; 413 413 if ($j < $other_len && $other_changed[$j]) { 414 414 $corresponding = $i; … … 424 424 while ($corresponding < $i) { 425 425 $changed[--$start] = 1; 426 426 $changed[--$i] = 0; 427 assert( '$j > 0');427 assert( $j > 0 ); 428 428 while ($other_changed[--$j]) { 429 429 continue; 430 430 } 431 assert( '$j >= 0 && !$other_changed[$j]');431 assert( $j >= 0 && !$other_changed[$j] ); 432 432 } 433 433 } 434 434 } -
src/wp-includes/Text/Diff/Engine/shell.php
83 83 84 84 if ($from_line_no < $match[1] || $to_line_no < $match[4]) { 85 85 // copied lines 86 assert( '$match[1] - $from_line_no == $match[4] - $to_line_no');86 assert( $match[1] - $from_line_no == $match[4] - $to_line_no ); 87 87 array_push($edits, 88 88 new Text_Diff_Op_copy( 89 89 $this->_getLines($from_lines, $from_line_no, $match[1] - 1),