[PRES] [web-pres2] master: Do this correctly

[email protected] (Derick Rethans) Fri, 9 Aug 2024 15:01:01 +0000
Newsgroups php.pres
Message-ID <[email protected]>
Author: Derick Rethans (derickr)
Date: 2024-08-09T16:00:41+01:00

Commit: https://github.com/php/web-pres2/commit/3303666f7c0697504202fcc2a1b483aded30125c
Raw diff: https://github.com/php/web-pres2/commit/3303666f7c0697504202fcc2a1b483aded30125c.diff

Do this correctly

Changed paths:
  M  XML_Presentation.php


Diff:

diff --git a/XML_Presentation.php b/XML_Presentation.php
index e55c32a..5115192 100644
--- a/XML_Presentation.php
+++ b/XML_Presentation.php
@@ -120,7 +120,7 @@ function startHandler($parser, $element, &$attribs)
 
             /* Special case for array properties */
             case 'SLIDE':
-                if (!array_key_exists($this->coid)) { $this->objects[$this->coid] = new _presentation; }
+                if (!array_key_exists($this->coid, $this->objects)) { $this->objects[$this->coid] = new _presentation; }
                 $this->objects[$this->coid]->slides[] = new _pres_slide();
                 $idx = count($this->objects[$this->coid]->slides)-1;
                 $this->_add_attribs($this->objects[$this->coid]->slides[$idx], $attribs);