Reverting class attribute usage to make it work with PHP 5.3

- Updated #171 to make it work with PHP 5.3 or lower
This commit is contained in:
japatel
2014-12-08 17:46:26 -06:00
parent 1406ef91da
commit bc47413c2a

View File

@@ -26,7 +26,7 @@ class ModelAccessorValidator
if ($mode != 'disabled') {
//If the mode is disabled, bypass the validation
foreach (array('set' . $attributeName, 'get' . $attributeName) as $methodName) {
if (get_class($class) == PPModel::class) {
if (get_class($class) == get_class(new PPModel())) {
// Silently return false on cases where you are using PPModel instance directly
return false;
}