The comment block seems to indicate that containerPaths should only be used
for backwards-compatibility, which implies it is optional.
The following code generated a notice:
$fsBackend = new FSFileBackend( array(
'name' => 'foo',
'lockManager' => 'fsLockManager',
'basePath' => '/tmp/foo',
);
$this->basePath = null; // none; containers must have explicit paths
}
- $this->containerPaths = (array)$config['containerPaths'];
- foreach ( $this->containerPaths as &$path ) {
- rtrim( $path, '/' ); // remove trailing slash
+ if( isset( $config['containerPaths'] ) ) {
+ $this->containerPaths = (array)$config['containerPaths'];
+ foreach ( $this->containerPaths as &$path ) {
+ rtrim( $path, '/' ); // remove trailing slash
+ }
}
+
$this->fileMode = isset( $config['fileMode'] )
? $config['fileMode']
: 0644;