[PRES] [web-pres2] master: Sometimes, the presentation is empty... so make sure it isn't.
[email protected] (Derick Rethans) Fri, 9 Aug 2024 14:53:24 +0000
| Newsgroups | php.pres |
|---|---|
| Message-ID | <[email protected]> |
Author: Derick Rethans (derickr)
Date: 2024-08-09T15:52:49+01:00
Commit: https://github.com/php/web-pres2/commit/ab875ef8b11d85e5c23472125a8bdd9063eec504
Raw diff: https://github.com/php/web-pres2/commit/ab875ef8b11d85e5c23472125a8bdd9063eec504.diff
Sometimes, the presentation is empty... so make sure it isn't.
Changed paths:
M XML_Presentation.php
Diff:
diff --git a/XML_Presentation.php b/XML_Presentation.php
index ffd18d1..e55c32a 100644
--- a/XML_Presentation.php
+++ b/XML_Presentation.php
@@ -120,6 +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; }
$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);