ZF-10682: Undefined offset: 0 Notice in Zend_Cache_Frontend_File
PHP Notice is being reported in Zend_Cache_Frontend_File and 'master_file' option left blank if 'master_files' options array has non-numeric indexes, or if index 0 (zero) does not exist. This occurs when a string-indexed array is being given as the third argument to Zend_Cache::factory() or when using cache manager XML config, for instance:
Affects all versions, including trunk.
How to reproduce:<?php include 'Zend/Cache.php'; Zend_Cache::factory( 'File', 'File', array( 'master_files' => array( 'my_file' => 'my_file.xml', ), ), array() ); ?>
$ php test.php PHP Notice: Undefined offset: 0 in Zend/Cache/Frontend/File.php on line 107
replace Zend/Cache/Frontend/File.php line 107:
$this->_specificOptions['master_file'] = $masterFiles; // to keep a compatibility
$this->_specificOptions['master_file'] = reset($masterFiles); // to keep a compatibility