Skip to content

error when loading ppt into reader #448

Open
@barrychapman

Description

@barrychapman

When opening a ppt file using the following:

    $path   = $this->attachment->prefix_path . $this->attachment->path . DS . $this->attachment->attachment;
    $doc    = \PhpOffice\PhpPresentation\IOFactory::createReader('PowerPoint97');
    $ppt    = $doc->load($path);

It errors no matter what with the following stacktrace:

Notice Error: Uninitialized string offset: 262837774 in [/data/web/wa/vendor/phpoffice/phppresentation/src/PhpPresentation/Reader/PowerPoint97.php, line 695]

2018-01-25 00:45:43 Notice: Notice (8): Uninitialized string offset: 262837774 in [/data/web/wa/vendor/phpoffice/phppresentation/src/PhpPresentation/Reader/PowerPoint97.php, line 695]
Trace:
Cake\Error\BaseErrorHandler::handleError() - CORE/src/Error/BaseErrorHandler.php, line 153
PhpOffice\PhpPresentation\Reader\PowerPoint97::getInt4d() - ROOT/vendor/phpoffice/phppresentation/src/PhpPresentation/Reader/PowerPoint97.php, line 695
PhpOffice\PhpPresentation\Reader\PowerPoint97::loadRecordHeader() - ROOT/vendor/phpoffice/phppresentation/src/PhpPresentation/Reader/PowerPoint97.php, line 643
PhpOffice\PhpPresentation\Reader\PowerPoint97::readRecordSlideSchemeColorSchemeAtom() - ROOT/vendor/phpoffice/phppresentation/src/PhpPresentation/Reader/PowerPoint97.php, line 2848
PhpOffice\PhpPresentation\Reader\PowerPoint97::readRecordSlideContainer() - ROOT/vendor/phpoffice/phppresentation/src/PhpPresentation/Reader/PowerPoint97.php, line 2744
PhpOffice\PhpPresentation\Reader\PowerPoint97::loadPowerpointDocumentStream() - ROOT/vendor/phpoffice/phppresentation/src/PhpPresentation/Reader/PowerPoint97.php, line 624
PhpOffice\PhpPresentation\Reader\PowerPoint97::loadFile() - ROOT/vendor/phpoffice/phppresentation/src/PhpPresentation/Reader/PowerPoint97.php, line 439
PhpOffice\PhpPresentation\Reader\PowerPoint97::load() - ROOT/vendor/phpoffice/phppresentation/src/PhpPresentation/Reader/PowerPoint97.php, line 418
App\Lib\Jobs\IndexAttachmentJob::parsePpt() - APP/Lib/Jobs/IndexAttachmentJob.php, line 177
App\Lib\Jobs\IndexAttachmentJob::perform() - APP/Lib/Jobs/IndexAttachmentJob.php, line 59

It seems to be something with the 32b integer is being read

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions