Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter happyvisions

    (@happyvisions)

    Just a quick update: I’ve fixed it by removing the throw exception and continuing the loop. However, please look into this for me!

    I replaced this:

    public function append(Node ...$nodes)
        {
            foreach ($nodes as $node) {
                if ( !$node instanceof Section ) {
                    throw new TypeNotSupported($node->getType());
                }
    
                $this->insertAtIndex($this->count(), $node);
            }
    
            return $this;
        }

    With this:

    public function append(Node ...$nodes)
        {
            foreach ($nodes as $node) {
                if ( !$node instanceof Section ) {
                    continue;
                }
    
                $this->insertAtIndex($this->count(), $node);
            }
    
            return $this;
        }

    Works for now. ??

Viewing 1 replies (of 1 total)