Skip to content

$basePPTX->addSlides($endPPTX->getSlides()); simply not workingย #15

Open
@abondon35

Description

Describe the bug
Just tried the "Demo code" to merge 2 files and it doesn't work.

To Reproduce
My code is simple :

(some code before to set variable with file path)
$ppt_transition = $this->ppt_transition;
$basePPTX = new PPTX($ppt_transition);

$ppt_introduction = $this->ppt_introduction;
$endPPTX = new PPTX($ppt_introduction);

$basePPTX->addSlides($endPPTX->getSlides());

Expected behavior
Not throwing erros ...

Screenshots
Error is the following

Fatal error: Uncaught TypeError: Return value of Cristal\Presentation\Resource\XmlResource::getUniqueID() must be of the type integer, float returned in F:\Developpement\Page Oueb\abondonworship\classes\utils\ppt\Cristal\Presentation\Resource\XmlResource.php:229 Stack trace: #0 F:\Developpement\Page Oueb\abondonworship\classes\utils\ppt\Cristal\Presentation\Resource\Presentation.php(39): Cristal\Presentation\Resource\XmlResource::getUniqueID() #1 F:\Developpement\Page Oueb\abondonworship\classes\utils\ppt\Cristal\Presentation\PPTX.php(173): Cristal\Presentation\Resource\Presentation->addResource(Object(Cristal\Presentation\Resource\SlideMaster)) #2 F:\Developpement\Page Oueb\abondonworship\classes\utils\ppt\Cristal\Presentation\PPTX.php(125): Cristal\Presentation\PPTX->addResource(Object(Cristal\Presentation\Resource\Slide)) #3 F:\Developpement\Page Oueb\abondonworship\classes\utils\ppt\Cristal\Presentation\PPTX.php(212): Cristal\Presentation\PPTX->addSlide(Object(Cristal\Presentation\Resource\Slide)) #4 F:\Developpement\ in F:\Developpement\Page Oueb\abondonworship\classes\utils\ppt\Cristal\Presentation\Resource\XmlResource.php on line 229

Desktop (please complete the following information):

  • OS: [Windows]
  • PHP Version: [ PHP 7.1.3 x86]
  • Software used to open the final PPTX [Powerpoint]

Additional context
I can open "template" and save both files, but merging them trows an error that looks like a bug from your project

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions