diff --git a/src/ePub/Loader/ZipFileLoader.php b/src/ePub/Loader/ZipFileLoader.php index e7c4f4d..8bf65b3 100644 --- a/src/ePub/Loader/ZipFileLoader.php +++ b/src/ePub/Loader/ZipFileLoader.php @@ -37,7 +37,8 @@ public function load($file) $ns = $package->getNamespaces(); foreach ($ns as $key => $value) { $package->registerXPathNamespace($key, $value); - $opfFile = (string) $package->xpath('//'. $key .':rootfile/@full-path')[0]['full-path']; + $items = $package->xpath('//'. $key .':rootfile/@full-path'); + $opfFile = (string) $items[0]['full-path']; } } @@ -61,4 +62,4 @@ public function load($file) return $package; } -} \ No newline at end of file +}