Skip to content

Commit

Permalink
fix Container Constructor problem in reference to bug #18742
Browse files Browse the repository at this point in the history
  • Loading branch information
iannsp committed Aug 25, 2011
1 parent 675644a commit ae824c6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,14 @@ function Cache($container, $container_options = '')
$container_class = 'Cache_Container_' . $container;
$container_classfile = 'Cache/Container/' . $container . '.php';

include_once $container_classfile;
$this->container = new $container_class($container_options);
@include_once $container_classfile;
if (class_exists($container_class)) {
$this->container = new $container_class($container_options);
} else {
$this->container = new Cache_Error(
"The Container requested {$container} is not supported"
);
}
}

//deconstructor
Expand Down

0 comments on commit ae824c6

Please sign in to comment.