Skip to content

Test failures with --enable-debug #17

@orlitzky

Description

@orlitzky

With php-8.x built with --enable-debug, we get a few test failures:

FAIL uploadprogress_get_contents - File contents not found [tests/uploadprogress_get_contents_variation002.phpt] FAIL uploadprogress_get_contents - Warns when function is disabled [tests/uploadprogress_get_contents_error001.phpt] FAIL uploadprogress_get_contents - Warns when maxlength is less than zero [tests/uploadprogress_get_contents_error003.phpt] FAIL uploadprogress_get_contents - When contents file cannot be read [tests/uploadprogress_get_contents_variation006.phpt] 

These are all expecting a bool(false) as the last line of the output, but instead we're getting

PHP Fatal error: uploadprogress_get_contents(): Return value must be of type ?string, bool returned in Unknown on line 0 

This should be pretty easy to avoid by checking for PHP_DEBUG and skipping those tests, or maybe there's some way to allow for both possible outputs? I guess it depends on how important that bool(false) is. I'm happy to make the pull request either way.

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