Skip to content

Conversation

@ktomk
Copy link

@ktomk ktomk commented Jan 6, 2022

asserting an expression with classExists(), and the expression is an array,
it shows me the following warning:

PHP Warning: class_exists() expects parameter 1 to be string, array
given in beberlei/assert/lib/Assert/Assertion.php on line 1860

on beberlei/assert v3.3.2 with php 7.4

and with php 8.0

PHP Fatal error: Uncaught TypeError: class_exists(): Argument #1 (
$class) must be of type string, array given in [...] Assertion.php:1860

add an is_string check.

asserting an expression with classExists(), and the expression is an array,
it shows me the following warning:

> PHP Warning:  class_exists() expects parameter 1 to be string, array
> given in beberlei/assert/lib/Assert/Assertion.php on line 1860

on beberlei/assert v3.3.2 with php 7.4

and with php 8.0

> PHP Fatal error:  Uncaught TypeError: class_exists(): Argument #1 (
> $class) must be of type string, array given in [...] Assertion.php:1860

add an is_string check.
@ktomk
Copy link
Author

ktomk commented Jan 6, 2022

FYI had an issue following assert/CONTRIBUTING.md on master when filing this PR, see #321

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

Successfully merging this pull request may close these issues.

1 participant