Skip to content

Illegal Offset w:compat  #1024

@shad0wfir3

Description

@shad0wfir3

Issue found when using latest build on PHP7. Reference to #927

Found a empty string in:
PHPOffice\PHPWord\Writer\Word2007\Part\Settings

getSettings():109

private function getSettings()
    {
           .......

            'w:compat' => ' ',

           ........
    }

Updated to

private function getSettings()
    {
           .......

            'w:compat' => array('@attributes' => array('w:val' => '')),

           ........
    }

And it seems to be working. Not sure if this is supposed to be used in the same way though, but this has allowed me to export and generate word docs.

Can anyone who knows more check and see if this is in fact a issue they are experiencing as well, otherwise, is this fix a valid fix for the problem?


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

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