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

PHP 8.1: getid3_quicktime::QuicktimeParseContainerAtom(): fix deprecation notice #337

Commits on Aug 23, 2021

  1. PHP 8.1: getid3_quicktime::QuicktimeParseContainerAtom(): fix depreca…

    …tion notice
    
    The `$atom_structure` is declared at the start of the method as `false`, but is subsequently assigned to as if it were an array in line 2122.
    
    This will throw a deprecation notice as of PHP 8.1: `Deprecated: Automatic conversion of false to array is deprecated in path/to/getid3/module.audio-video.quicktime.php on line 2122`
    
    Fixed now, by setting the initial value as an empty array, breaking out of the `while` instead of returning and checking whether the array is still empty at the end, and if so, returning `false`.
    
    This should maintain the existing behaviour, but get round the deprecation notice.
    
    Ref: https://wiki.php.net/rfc/autovivification_false
    jrfnl committed Aug 23, 2021
    Configuration menu
    Copy the full SHA
    e12b317 View commit details
    Browse the repository at this point in the history