Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small bug fix - BEFORE_SAVE proposal #16

Open
ydakilux opened this issue Jan 10, 2020 · 0 comments
Open

Small bug fix - BEFORE_SAVE proposal #16

ydakilux opened this issue Jan 10, 2020 · 0 comments

Comments

@ydakilux
Copy link

Hello,

In the function saveSpreadsheetToFile, you need to change

    if (isset($events['beforeSave']) AND is_callable($events['beforeSave'])) {
        $events['beforeSave']($spreadsheet, $writer);
    }

to

if (isset($events[self::BEFORE_SAVE]) AND is_callable($events[self::BEFORE_SAVE])) {
        $events[self::BEFORE_SAVE]($spreadsheet, $writer);
}

Otherwise BEFORE_SAVE event are never called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant