mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-13 15:18:41 +00:00
fix minor bugs
This commit is contained in:
parent
dd0a71421a
commit
1675a82410
|
|
@ -316,7 +316,7 @@ class Matrix implements \ArrayAccess, \Iterator
|
||||||
$isSymmetric = true;
|
$isSymmetric = true;
|
||||||
for ($j = 0; ($j < $this->m) & $isSymmetric; ++$j) {
|
for ($j = 0; ($j < $this->m) & $isSymmetric; ++$j) {
|
||||||
for ($i = 0; ($i < $this->n) & $isSymmetric; ++$i) {
|
for ($i = 0; ($i < $this->n) & $isSymmetric; ++$i) {
|
||||||
$isSymmetric = ($this->matrix[$i][$j] === $this->matrix[$j][$i]);
|
$isSymmetric = \abs($this->matrix[$i][$j] - $this->matrix[$j][$i]) < self::EPSILON;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2088,7 +2088,7 @@ class Markdown
|
||||||
|
|
||||||
$Block['element']['attributes'] = $this->parseAttributeData($attributeString);
|
$Block['element']['attributes'] = $this->parseAttributeData($attributeString);
|
||||||
|
|
||||||
$Block['element']['handler']['argument'] = \substr($Block['element']['handler']['argument'], 0, $matches[0][1]);
|
$Block['element']['handler']['argument'] = \substr($Block['element']['handler']['argument'], 0, (int) $matches[0][1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $Block;
|
return $Block;
|
||||||
|
|
@ -2207,7 +2207,7 @@ class Markdown
|
||||||
|
|
||||||
$Block['element']['attributes'] = $this->parseAttributeData($attributeString);
|
$Block['element']['attributes'] = $this->parseAttributeData($attributeString);
|
||||||
|
|
||||||
$Block['element']['handler']['argument'] = \substr($Block['element']['handler']['argument'], 0, $matches[0][1]);
|
$Block['element']['handler']['argument'] = \substr($Block['element']['handler']['argument'], 0, (int) $matches[0][1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $Block;
|
return $Block;
|
||||||
|
|
@ -4022,7 +4022,7 @@ class Markdown
|
||||||
|
|
||||||
while (\preg_match($regexp, $text, $matches, \PREG_OFFSET_CAPTURE))
|
while (\preg_match($regexp, $text, $matches, \PREG_OFFSET_CAPTURE))
|
||||||
{
|
{
|
||||||
$offset = $matches[0][1];
|
$offset = (int) $matches[0][1];
|
||||||
$before = \substr($text, 0, $offset);
|
$before = \substr($text, 0, $offset);
|
||||||
$after = \substr($text, $offset + \strlen($matches[0][0]));
|
$after = \substr($text, $offset + \strlen($matches[0][0]));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user