[PRES] [web-pres2] master: Do this correctly
| From: | Derick Rethans | Date: | Fri, 09 Aug 2024 15:01:01 +0000 |
| Subject: | [PRES] [web-pres2] master: Do this correctly | ||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-2453@lists.php.net to get a copy of this message | ||
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);