Fix API version validation condition for non-installed packages
authorMatthias Schmidt <gravatronics@live.com>
Sat, 23 Dec 2017 16:33:35 +0000 (17:33 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 23 Dec 2017 16:33:35 +0000 (17:33 +0100)
See 321c62240d45582e6f8d74f42c9a14464adb3131

wcfsetup/install/files/lib/system/package/validation/PackageValidationArchive.class.php

index 06a732a17400b5b7808df2d0c890795c545a7370..2b18a8ef26e26dd1524c651168bda5b4ce48c300 100644 (file)
@@ -216,7 +216,7 @@ class PackageValidationArchive implements \RecursiveIterator {
                                throw new PackageValidationException(PackageValidationException::INCOMPATIBLE_API_VERSION, ['isOlderVersion' => $isOlderVersion]);
                        }
                }
-               else if (ENABLE_DEBUG_MODE && ENABLE_DEVELOPER_TOOLS && $package->package !== 'com.woltlab.wcf') {
+               else if (ENABLE_DEBUG_MODE && ENABLE_DEVELOPER_TOOLS && ($package === null || $package->package !== 'com.woltlab.wcf')) {
                        throw new PackageValidationException(PackageValidationException::MISSING_API_VERSION);
                }