|
@@ -65,12 +65,14 @@ class Zend_Serializer
|
|
|
throw new Zend_Serializer_Exception('Can\'t load serializer adapter "'.$adapterName.'"', 0, $e);
|
|
throw new Zend_Serializer_Exception('Can\'t load serializer adapter "'.$adapterName.'"', 0, $e);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $adapterObj = new $adapterClass($opts);
|
|
|
|
|
- if (!$adapterObj instanceof Zend_Serializer_Adapter_AdapterInterface) {
|
|
|
|
|
|
|
+ // ZF-8842:
|
|
|
|
|
+ // check that the loaded class implements Zend_Serializer_Adapter_AdapterInterface without execute code
|
|
|
|
|
+ if (!in_array('Zend_Serializer_Adapter_AdapterInterface', class_implements($adapterClass))) {
|
|
|
require_once 'Zend/Serializer/Exception.php';
|
|
require_once 'Zend/Serializer/Exception.php';
|
|
|
throw new Zend_Serializer_Exception('The serializer adapter class "'.$adapterClass.'" must implement Zend_Serializer_Adapter_AdapterInterface');
|
|
throw new Zend_Serializer_Exception('The serializer adapter class "'.$adapterClass.'" must implement Zend_Serializer_Adapter_AdapterInterface');
|
|
|
}
|
|
}
|
|
|
- return $adapterObj;
|
|
|
|
|
|
|
+
|
|
|
|
|
+ return new $adapterClass($opts);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|