krakjoe / uopz

User Operations for Zend
Other
356 stars 47 forks source link

bug in instanceof #98

Closed survilla closed 5 years ago

survilla commented 5 years ago

We observe that the php operator instanceof is not working properly with uopz 5.1.0. It fails with fatal error once the class doesn't exist. It should just return false based on documentation. It is working as expected once we downgrade to uopz 5.0.2. See example code bellow.

class MyClass {
}
$obj = new MyClass();
$classname = "ClassWhichDoesntExist";
var_export($obj instanceof $classname);  // fatal error ...

PHP info: phpi-oss.txt

krakjoe commented 5 years ago

Please try that latest sources in master branch.

jancamstreamer commented 5 years ago

Sorry, I'm not able to compile it from source. We've decided to remove uopz from our environment, because we don't use it anymore. Anyway we observed a fatal error once we've tried to include Doctrine lib using php with uopz 5.0.2.

krakjoe commented 5 years ago

Fixed in 6.0.0