: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
namespace Nextend\Framework\Misc\Zip\Reader;
use Nextend\Framework\Misc\Zip\ReaderInterface;
class ZipExtension implements ReaderInterface {
public function read($path) {
if (!$zip->open($path)) {
for ($i = 0; $i < $zip->numFiles; $i++) {
$stat = $zip->statIndex($i);
$this->recursiveRead($data, explode('/', $stat['name']), $zip->getFromIndex($i));
private function recursiveRead(&$data, $parts, $content) {
if (count($parts) == 1) {
$data[$parts[0]] = $content;
if (!isset($data[$parts[0]])) {
$data[$parts[0]] = array();
$this->recursiveRead($data[array_shift($parts)], $parts, $content);