[PRES] [web-pres2] master: Sometimes, the presentation is empty... so make sure it isn't.

From: Date: Fri, 09 Aug 2024 14:53:24 +0000
Subject: [PRES] [web-pres2] master: Sometimes, the presentation is empty... so make sure it isn't.
Groups: php.pres 
Request: Send a blank email to pres+get-2452@lists.php.net to get a copy of this message
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);

« previous php.pres (#2452) next »