* @param unknown_type $error
*/
public function setError($name, $error) {
- foreach ($this->container as $container) {
- $this->containers->setError($name, $error);
+ foreach ($this->containers as $container) {
+ $container->setError($name, $error);
}
}
}
if ($packageDir !== null) {
// validate package dir
- if (file_exists(FileUtil::addLeadingSlash($packageDir) . 'global.php')) {
+ if (file_exists(FileUtil::addTrailingSlash($packageDir) . 'global.php')) {
$document->setError('packageDir', WCF::getLanguage()->get('wcf.acp.package.packageDir.notAvailable'));
- return null;
+ return $document;
}
// set package dir