diff --git a/DataStorage/Database/Mapper/ReadMapper.php b/DataStorage/Database/Mapper/ReadMapper.php index a966f4f13..536a563e2 100755 --- a/DataStorage/Database/Mapper/ReadMapper.php +++ b/DataStorage/Database/Mapper/ReadMapper.php @@ -456,6 +456,8 @@ final class ReadMapper extends DataMapperAbstract ] ); + var_dump($query->execute()?->fetchColumn()); + return $query->execute()?->fetchColumn(); } diff --git a/Stdlib/Tree/BinarySearchTree.php b/Stdlib/Tree/BinarySearchTree.php index f0c37cfa2..d29c16398 100644 --- a/Stdlib/Tree/BinarySearchTree.php +++ b/Stdlib/Tree/BinarySearchTree.php @@ -243,8 +243,12 @@ class BinarySearchTree } $temp = null; - if ($node->left === null) { + if ($node->right !== null) { $temp = $node->right->root; + if ($temp === null) { + return; + } + if ($node->parent !== null) { if ($node->parent->left !== null && $node->parent->left->root?->compare($node->data) === 0 @@ -264,8 +268,12 @@ class BinarySearchTree return; } - if ($node->right === null) { + if ($node->left !== null) { $temp = $node->left->root; + if ($temp === null) { + return; + } + if ($node->parent !== null) { if ($node->parent->left !== null && $node->parent->left->root?->compare($node->data) === 0 @@ -291,6 +299,13 @@ class BinarySearchTree } } + /** + * To array + * + * @return array + * + * @since 1.0.0 + */ public function toArray() : array { return $this->root?->toArray() ?? ['key' => null, 0 => null, 1 => null]; diff --git a/Stdlib/Tree/Node.php b/Stdlib/Tree/Node.php index b82356564..c75fa510a 100644 --- a/Stdlib/Tree/Node.php +++ b/Stdlib/Tree/Node.php @@ -100,6 +100,13 @@ class Node return $this->data <=> $data; } + /** + * To array + * + * @return array + * + * @since 1.0.0 + */ public function toArray() : array { return [ diff --git a/Utils/Parser/Calendar/ICalParser.php b/Utils/Parser/Calendar/ICalParser.php index 22430f59f..5522ab3f6 100755 --- a/Utils/Parser/Calendar/ICalParser.php +++ b/Utils/Parser/Calendar/ICalParser.php @@ -67,7 +67,7 @@ class ICalParser $event['location'] = $locationMatch[1]; \preg_match('/GEO:(.*?)\r\n/', $match[1], $geo); - $temp = \explode(';', $geo[1]); + $temp = \explode(';', $geo[1]); $event['geo'] = [ 'lat' => (float) $temp[0], 'lon' => (float) $temp[1],