You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The only file I have changed is tests/Support/SupportCollectionTest.php for the sake of testing and executed error_reporting(0). Changing php.ini also works.
Cause
The test works because of a PHP notice that gets generated when a stdClass is compared with an integer. With error reporting on Object of class stdClass could not be converted to int will be generated and catched and returns false.
But when error_reporting is off there is no error generated and this function will return true.
Description:
When I change error_reporting to
E_NONE
the behavior ofCollection->where
changes and then a unit test fails.Steps To Reproduce:
I have forked the repository and used travis to check. This build fails because of a unit test that is failing https://travis-ci.org/leonrenkema/framework/builds/303214891.
The only file I have changed is tests/Support/SupportCollectionTest.php for the sake of testing and executed
error_reporting(0)
. Changing php.ini also works.Cause
The test works because of a PHP notice that gets generated when a stdClass is compared with an integer. With error reporting on
Object of class stdClass could not be converted to int
will be generated and catched and returns false.But when error_reporting is off there is no error generated and this function will return true.
Illuminate/Support/Collection.php:484
The text was updated successfully, but these errors were encountered: