lat9 / vat4eu

VAT Processing for European Countries for Zen Cart 1.5.8a and 2.0.x
Other
1 stars 2 forks source link

PHP 8 - blank page on module installation #19

Closed webchills closed 7 months ago

webchills commented 2 years ago

Zen Cart 1.5.7d

PHP 8.0.16

Before module installation VAT4EU_MIN_LENGTH is not defined yet, but is already called in admin/includes/languages/english/extra_definitions/vat4eu_extra_definitions_admin.php

Result: blank page when entering admin with

Uncaught Error: Undefined constant "VAT4EU_MIN_LENGTH" in /xxx/admin/includes/languages/english/extra_definitions/vat4eu_extra_definitions_admin.php:28

Suggestion

add to vat4eu_extra_definitions_admin.php:

if (!defined('VAT4EU_MIN_LENGTH')) define('VAT4EU_MIN_LENGTH', '');

lat9 commented 2 years ago

Slightly different correction than that proposed; that'll make the module's language files easier to upgrade for zc158.