Skip to content
Snippets Groups Projects
Commit dd5c3e2b authored by Phy's avatar Phy
Browse files

remove deprecated each calls in libraries

parent 8f1011e8
No related branches found
No related tags found
No related merge requests found
......@@ -270,27 +270,29 @@ class _DiffEngine {
if (empty($ymatches[$line]))
continue;
$matches = $ymatches[$line];
reset($matches);
while (list ($junk, $y) = each($matches))
if (empty($this->in_seq[$y])) {
$k = $this->_lcs_pos($y);
USE_ASSERTS && assert($k > 0);
$ymids[$k] = $ymids[$k-1];
break;
}
while (list ($junk, $y) = each($matches)) {
if ($y > $this->seq[$k-1]) {
USE_ASSERTS && assert($y < $this->seq[$k]);
// Optimization: this is a common case:
// next match is just replacing previous match.
$this->in_seq[$this->seq[$k]] = false;
$this->seq[$k] = $y;
$this->in_seq[$y] = 1;
}
else if (empty($this->in_seq[$y])) {
$k = $this->_lcs_pos($y);
USE_ASSERTS && assert($k > 0);
$ymids[$k] = $ymids[$k-1];
$switch = false;
foreach ($matches as $y) {
if(!$switch) {
if (empty($this->in_seq[$y])) {
$k = $this->_lcs_pos($y);
USE_ASSERTS && assert($k > 0);
$ymids[$k] = $ymids[$k-1];
$switch = true;
}
}else{
if ($y > $this->seq[$k-1]) {
USE_ASSERTS && assert($y < $this->seq[$k]);
// Optimization: this is a common case:
// next match is just replacing previous match.
$this->in_seq[$this->seq[$k]] = false;
$this->seq[$k] = $y;
$this->in_seq[$y] = 1;
}
else if (empty($this->in_seq[$y])) {
$k = $this->_lcs_pos($y);
USE_ASSERTS && assert($k > 0);
$ymids[$k] = $ymids[$k-1];
}
}
}
}
......@@ -876,10 +878,10 @@ class DiffFormatter {
/**
* Escape string
*
*
* Override this method within other formatters if escaping required.
* Base class requires $str to be returned WITHOUT escaping.
*
*
* @param $str string Text string to escape
* @return string The escaped string.
*/
......
......@@ -2522,13 +2522,13 @@ class JpegMeta {
$pos = 14;
reset($this->_info['adobe']['raw']);
while (list($key) = each($this->_info['adobe']['raw'])) {
foreach ($this->_info['adobe']['raw'] as $value){
$pos = $this->_write8BIM(
$data,
$pos,
$this->_info['adobe']['raw'][$key]['type'],
$this->_info['adobe']['raw'][$key]['header'],
$this->_info['adobe']['raw'][$key]['data'] );
$value['type'],
$value['header'],
$value['data'] );
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment