Modify

Opened 3 years ago

Closed 3 years ago

#2329 closed Bug/Fehler (fixed)

Weiße Seite bei easycredit-Bestellungen in account_history_info.php

Reported by: anonymous Owned by: Gerhard Waldemair
Priority: hoch Milestone: modified-shop-2.0.8.0
Component: Module Version: 2.0.7.2
Keywords: Cc:
Blocked By: Blocking:

Description

Bei der Anzeige von easycredit-Bestellungen in der Bestellhistorie gibt es eine Fehlermeldung:

[2022-09-02 12:31:20]	[error]	[modified]	[pid:40176]	ERROR found for URL: /dev/account_history_info.php?order_id=1	{}	{}
[2022-09-02 12:31:20]	[error]	[modified]	[pid:40176]	Cannot access offset of type string on string in File: LOKALER_PFAD\htdocs\dev\includes\modules\payment\easycredit.php on Line: 134	{}	{}

Getestet in mehreren Shops, unter anderem einer frischen Installation mit ausschließlich easycredit installiert. Da ich meine easycredit-Credentials nicht im Demo-Shop eintragen wollte, habe ich es dort nicht getestet.

Shop-Version 2.0.7.2
Getestet mit PHP 8.1.6 und 8.0.22

Attachments (1)

changeset_14774.zip (8.9 KB ) - added by Torsten Riemer 3 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 by Timm, 3 years ago

Ähnliche Meldung kommt auch bei moneyorder.

[2022-09-01 05:51:33]   [error] [modified]      [pid:17191]     ERROR found for URL: /account_history_info.php?order_id=279309  {}      {}
[2022-09-01 05:51:33]   [error] [modified]      [pid:17191]     Cannot access offset of type string on string in File: /www/htdocs/***/includes/modules/payment/moneyorder.php on Line: 51      {}      {}

Gemeldet wurde das hier: CANNOT ACCESS OFFSET OF TYPE STRING ON STRING IN FILE & CANNOT DECLARE CLASS

comment:2 by Torsten Riemer, 3 years ago

Milestone: modified-shop-2.0.8.0

comment:3 by noRiddle, 3 years ago

Eventuell sollte hier schneller gehandelt werden:

Nach der order-Class zu schließen gibt es $order-billing['country'] als mehrdimensionales Array nur in der Methode cart().
In der Methode query() gibt's nur das einfache Array und die Werte $order->billing['country_iso_code_2'] oder $order->billing['country_iso_2'].

In der account_history_info.php wird, da es ja um bereits getätigte Bestellungen geht, die Methode query() benutzt.

Vielleicht sollte man das in der order-Class vereinheitlichen, damit man sich nicht vertun kann ?
Außerdem würde man sich in den Zahlungsmodulen nicht code-mäßig strecken müssen à la (Beispiel)

if(isset($order->billing['country']['iso_code_2'])) {
  $VARIABLE = $order->billing['country']['iso_code_2'];
} else {
  $VARIABLE = $order->billing['country_iso_code_2'];
}

Außerdem:
In Zahlungsmodulen wird oft abgefragt

if ($order->billing['country']['iso_code_2'] != '') {

was korrekt nur mit vorheriger isset()-Abfrage wäre.


Mir scheint, daß aufgrund der zwei hier gemeldeten Fehler alles durchgeschaut werden muß wo
$order->billing['country']['id']
oder
$order->billing['country']['iso_code_2']
vielleicht auch noch wo das vorkommt
$order->billing['country']['title']
und
$order->billing['country']['iso_code_3']

vorkommt.

Gruß,
noRiddle

comment:4 by derHeiko, 3 years ago

Ich stelle mal einen Log aus unserem Shop vom 03.09 zur Verfügung. Bei rund 150 Bestellungen kommt so oft die Fehlermeldung, ich hoffe das hilft. Demoshop auf meinem Server wo dies auftritt kann ich gerne zur Verfügung stellen.

[2022-09-03 09:45:20]	[error]	[modified]	[pid:15202]	ERROR found for URL: /account_history_info.php?order_id=542977	{}	{}
[2022-09-03 09:45:20]	[error]	[modified]	[pid:15202]	Cannot access offset of type string on string in File: /www/htdocs/***/includes/external/paypal/classes/PayPalPaymentBase.php on Line: 120	{}	{}
[2022-09-03 10:13:08]	[error]	[modified]	[pid:22753]	ERROR found for URL: /account_history_info.php?order_id=542858	{}	{}
[2022-09-03 10:13:08]	[error]	[modified]	[pid:22753]	Cannot access offset of type string on string in File: /www/htdocs/***/includes/external/paypal/classes/PayPalPaymentBase.php on Line: 120	{}	{}
[2022-09-03 10:14:08]	[error]	[modified]	[pid:16974]	ERROR found for URL: /account_history_info.php?order_id=542858	{}	{}
[2022-09-03 10:14:08]	[error]	[modified]	[pid:16974]	Cannot access offset of type string on string in File: /www/htdocs/***/includes/external/paypal/classes/PayPalPaymentBase.php on Line: 120	{}	{}
[2022-09-03 10:14:13]	[error]	[modified]	[pid:16919]	ERROR found for URL: /account_history_info.php?order_id=542858	{}	{}
[2022-09-03 10:14:13]	[error]	[modified]	[pid:16919]	Cannot access offset of type string on string in File: /www/htdocs/***/includes/external/paypal/classes/PayPalPaymentBase.php on Line: 120	{}	{}
[2022-09-03 10:14:16]	[error]	[modified]	[pid:16919]	ERROR found for URL: /account_history_info.php?order_id=542858	{}	{}
[2022-09-03 10:14:16]	[error]	[modified]	[pid:16919]	Cannot access offset of type string on string in File: /www/htdocs/***/includes/external/paypal/classes/PayPalPaymentBase.php on Line: 120	{}	{}
[2022-09-03 11:21:08]	[error]	[modified]	[pid:31689]	ERROR found for URL: /shopping_cart.php	{}	{}
[2022-09-03 11:21:08]	[error]	[modified]	[pid:31689]	Cannot declare class dhl, because the name is already in use in File: /www/htdocs/***/includes/modules/shipping/dhl.php on Line: 20	{}	{}
[2022-09-03 11:46:48]	[error]	[modified]	[pid:31689]	ERROR found for URL: /account_history_info.php?order_id=542142	{}	{}
[2022-09-03 11:46:48]	[error]	[modified]	[pid:31689]	Cannot access offset of type string on string in File: /www/htdocs/***/includes/external/paypal/classes/PayPalPaymentBase.php on Line: 120	{}	{}
[2022-09-03 11:46:58]	[error]	[modified]	[pid:31689]	ERROR found for URL: /account_history_info.php?order_id=542142	{}	{}
[2022-09-03 11:46:58]	[error]	[modified]	[pid:31689]	Cannot access offset of type string on string in File: /www/htdocs/***/includes/external/paypal/classes/PayPalPaymentBase.php on Line: 120	{}	{}
[2022-09-03 14:04:41]	[error]	[modified]	[pid:2664]	ERROR found for URL: /account_history_info.php?order_id=226074	{}	{}
[2022-09-03 14:04:41]	[error]	[modified]	[pid:2664]	Cannot access offset of type string on string in File: /www/htdocs/***/includes/modules/payment/moneyorder.php on Line: 51	{}	{}
[2022-09-03 14:05:07]	[error]	[modified]	[pid:2558]	ERROR found for URL: /account_history_info.php?order_id=226074	{}	{}
[2022-09-03 14:05:07]	[error]	[modified]	[pid:2558]	Cannot access offset of type string on string in File: /www/htdocs/***/includes/modules/payment/moneyorder.php on Line: 51	{}	{}
[2022-09-03 14:07:27]	[error]	[modified]	[pid:2559]	ERROR found for URL: /account_history_info.php?order_id=226074	{}	{}
[2022-09-03 14:07:27]	[error]	[modified]	[pid:2559]	Cannot access offset of type string on string in File: /www/htdocs/***/includes/modules/payment/moneyorder.php on Line: 51	{}	{}
[2022-09-03 14:56:41]	[error]	[modified]	[pid:27661]	ERROR found for URL: /shopping_cart.php	{}	{}
[2022-09-03 14:56:41]	[error]	[modified]	[pid:27661]	Cannot declare class dhl, because the name is already in use in File: /www/htdocs/***/includes/modules/shipping/dhl.php on Line: 20	{}	{}
[2022-09-03 19:10:21]	[error]	[modified]	[pid:18192]	ERROR found for URL: /shopping_cart.php	{}	{}
[2022-09-03 19:10:21]	[error]	[modified]	[pid:18192]	Cannot declare class dhl, because the name is already in use in File: /www/htdocs/***/includes/modules/shipping/dhl.php on Line: 20	{}	{}
[2022-09-03 20:54:46]	[error]	[modified]	[pid:24805]	ERROR found for URL: /print_order.php?oID=543254	{}	{}
[2022-09-03 20:54:46]	[error]	[modified]	[pid:24805]	Cannot access offset of type string on string in File: /www/htdocs/***/includes/external/paypal/classes/PayPalPaymentBase.php on Line: 120	{}	{}
[2022-09-03 20:55:11]	[error]	[modified]	[pid:24803]	ERROR found for URL: /print_order.php?oID=543254	{}	{}
[2022-09-03 20:55:11]	[error]	[modified]	[pid:24803]	Cannot access offset of type string on string in File: /www/htdocs/***/includes/external/paypal/classes/PayPalPaymentBase.php on Line: 120	{}	{}
[2022-09-03 21:15:08]	[error]	[modified]	[pid:24803]	ERROR found for URL: /print_order.php?oID=543257	{}	{}
[2022-09-03 21:15:08]	[error]	[modified]	[pid:24803]	Cannot access offset of type string on string in File: /www/htdocs/***/includes/external/paypal/classes/PayPalPaymentBase.php on Line: 120	{}	{}


comment:5 by derHeiko, 3 years ago

Ich konnte diese Meldung aus meinen Error.log entfernen, in dem ich bei allen Zahlungsmodulen die Zahlungszone auf --keine-- gesetzt habe. Seit dem ist es Still im error.log.

comment:6 by noRiddle, 3 years ago

Trotzdem ist das ein Fehler wie ich ihn in Comment 3 beschrieben habe.

Gruß,
noRiddle

comment:7 by noRiddle, 3 years ago

Ich würde die Priorität hier mal höher setzen. Der Fehler kann dazu führen, daß man nichts bestellen kann.

Gruß,
noRiddle

comment:8 by Torsten Riemer, 3 years ago

Priority: normalhoch

comment:9 by Gerhard Waldemair, 3 years ago

Owner: set to Gerhard Waldemair
Resolution: fixed
Status: newclosed

In 14774:

fix #2329, #2392 - fix order class for country to be always an array

by Torsten Riemer, 3 years ago

Attachment: changeset_14774.zip added

Modify Ticket

Action
as closed The owner will remain Gerhard Waldemair.
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.