HubertLohmaier74 / DHL_entwicklerportal_api

Creating DHL labels using DHL Entwickler Portal API
GNU General Public License v3.0
2 stars 3 forks source link

$this->responseFile not existing #2

Closed individole closed 2 years ago

individole commented 2 years ago

With PHP 8.0 Lines 612 and 634 in dhl_gks_labelcreator.php return in an issue, cause property does not exists.

Possible solution: if (property_exists($this, "responseFile") && $this->responseFile != "")

HubertLohmaier74 commented 2 years ago

JAN 26th: Thank you very much for this comment. I will have a look at it and will add it if I find it reasonable.

Maybe you could tell me, if this issue with PHP 8 shows up every time or only in certain setup?

individole commented 2 years ago

Background - i have buttons in my framework calling an Ajax function, within the PHP called by Ajax i create the label. Maybe this setup is the problem and not PHP 8.0. I just do not see any intitialization of $this->responseFile in any of your files. So i am not surprised about the error. If it is an error ... PHP 8.0+ seems to be much more "aggressive" about missing variables and so it results in errors stopping the scripts working at all. Just my 50% knowledge opinion ;-)

HubertLohmaier74 commented 2 years ago

You may try now. It seems to work now. Only premium service was not set as I have expected. I need to check that. Remember that V66WPI can used in a variety of combinations. Normal-GoGreen / Economy-Premium / NoCustomsEU-CustomsOutsideEU. And so far as I see it for GoGreen one has to change procedure number from 01 to 04. But you should see that in "https://geschaeftskunden.dhl.de/customeradministration/customerdataoverview".