1
0
mirror of synced 2024-12-13 14:56:01 +03:00

[DDC-1937] Fix bug with apc and annotation caching using a workaround.

This commit is contained in:
Benjamin Eberlei 2012-07-29 11:56:41 +02:00
parent e8d3fc73ff
commit 00a5f18544

View File

@ -60,8 +60,12 @@ class AnnotationDriver extends AbstractAnnotationDriver
$classAnnotations = $this->reader->getClassAnnotations($class);
if ($classAnnotations && is_numeric(key($classAnnotations))) {
foreach ($classAnnotations as $annot) {
if ($classAnnotations) {
foreach ($classAnnotations as $key => $annot) {
if ( ! is_numeric($key)) {
continue;
}
$classAnnotations[get_class($annot)] = $annot;
}
}
@ -456,8 +460,11 @@ class AnnotationDriver extends AbstractAnnotationDriver
if ($method->isPublic() && $method->getDeclaringClass()->getName() == $class->name) {
$annotations = $this->reader->getMethodAnnotations($method);
if ($annotations && is_numeric(key($annotations))) {
foreach ($annotations as $annot) {
if ($annotations) {
foreach ($annotations as $key => $annot) {
if ( ! is_numeric($key)) {
continue;
}
$annotations[get_class($annot)] = $annot;
}
}