Modify

Opened 4 years ago

Closed 4 years ago

#2081 closed Bug/Fehler (fixed)

2 warnings fixen, $_SESSION['billing_zone'] und $return_string in shopping_cart.php

Reported by: noRiddle Owned by: somebody
Priority: normal Milestone: modified-shop-2.0.7.0
Component: Shop Version: 2.0.6.0
Keywords: Cc:
Blocked By: Blocking:

Description

Hier die Warnings mit Fix-Vorschlag:

/includes/modules/order_total/ot_payment.php

[2021-08-02 16:23:53]	[warning]	[modified]	[pid:7493]	WARNING found for URL: /shopping_cart.php	{}	{}
[2021-08-02 16:23:53]	[warning]	[modified]	[pid:7493]	Undefined array key "billing_zone" in File: /PATH/includes/modules/order_total/ot_payment.php on Line: 81	{}	{}
[2021-08-02 16:23:53]	[warning]	[modified]	[pid:7493]	Backtrace #0 - /PATH/includes/classes/order_total.php called at Line 260	{}	{}
[2021-08-02 16:23:53]	[warning]	[modified]	[pid:7493]	Backtrace #1 - /PATH/includes/shipping_estimate.php called at Line 81	{}	{}
[2021-08-02 16:23:53]	[warning]	[modified]	[pid:7493]	Backtrace #2 - /PATH/includes/modules/order_details_cart.php called at Line 167	{}	{}
[2021-08-02 16:23:53]	[warning]	[modified]	[pid:7493]	Backtrace #3 - /PATH/shopping_cart.php called at Line 55	{}	{}

Fix:
Ersetzen von $_SESSION['billing_zone'] durch $order->billing['country']['iso_code_2'], da erstes nicht definiert an der Stelle.
Nicht sicher. evtl. resultiert das Warning aus den Änderungen zu Ticket #1971 ? (nicht geprüft)


/includes/extra/application_bottom/10_matomo.php:

[2021-08-02 16:33:57]	[warning]	[modified]	[pid:8261]	WARNING found for URL: /shopping_cart.php	{}	{}
[2021-08-02 16:33:57]	[warning]	[modified]	[pid:8261]	Undefined variable $return_string in File: /PATH/includes/extra/application_bottom/10_matomo.php on Line: 134	{}	{}
[2021-08-02 16:33:57]	[warning]	[modified]	[pid:8261]	Backtrace #0 - /PATH/includes/application_bottom.php called at Line 49	{}	{}
[2021-08-02 16:33:57]	[warning]	[modified]	[pid:8261]	Backtrace #1 - /PATH/shopping_cart.php called at Line 154	{}	{}

Fix:
In beiden Funktionen wo die Variable vorkommt diese vor den jeweiligen if-Clauses definieren und nicht innerhalb, also nach den global-Definitionen.

Gruß,
noRiddle

Attachments (0)

Change History (1)

comment:1 by Gerhard Waldemair, 4 years ago

Resolution: fixed
Status: newclosed

In 13694:

fix #2081 - fix warning

Modify Ticket

Action
as closed The owner will remain somebody.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.