diff --git a/Math/Matrix/Matrix.php b/Math/Matrix/Matrix.php index 0522f96a5..ab9abb1a4 100755 --- a/Math/Matrix/Matrix.php +++ b/Math/Matrix/Matrix.php @@ -316,7 +316,7 @@ class Matrix implements \ArrayAccess, \Iterator $isSymmetric = true; for ($j = 0; ($j < $this->m) & $isSymmetric; ++$j) { 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; } } diff --git a/Utils/Parser/Markdown/Markdown.php b/Utils/Parser/Markdown/Markdown.php index d548f0d31..8a26a8f01 100755 --- a/Utils/Parser/Markdown/Markdown.php +++ b/Utils/Parser/Markdown/Markdown.php @@ -2088,7 +2088,7 @@ class Markdown $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; @@ -2207,7 +2207,7 @@ class Markdown $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; @@ -4022,7 +4022,7 @@ class Markdown while (\preg_match($regexp, $text, $matches, \PREG_OFFSET_CAPTURE)) { - $offset = $matches[0][1]; + $offset = (int) $matches[0][1]; $before = \substr($text, 0, $offset); $after = \substr($text, $offset + \strlen($matches[0][0]));