Neuigkeiten
  • Die modified eCommerce Shopsoftware ist kostenlos, aber nicht umsonst.
    Spenden
  • Damit wir die modified eCommerce Shopsoftware auch zukünftig kostenlos anbieten können:
    Spenden
  • Thema: PHP 7.2 Warning "Use of undefined constant"

    Cookie

    • Fördermitglied
    • Beiträge: 274
    PHP 7.2 Warning "Use of undefined constant"
    am: 13. Januar 2019, 14:56:13
    Hallo zusammen,

    ich habe gerade auf einen neuen Server mit PHP 7.2 migriert. Hier kommen leider für undefinierte Konstanten Warning Messages im Log.

    Weiß jemand, wie man die Meldungen im Loglevel WARN abschalten kann? Ich habe jetzt komplett WARN abgeschaltet, aber das ist natürlich keine Lösung. Und alle Konstanten zu definieren wird sicherlich etwas dauern.

    Hier ein Bsp.:
    Code: PHP  [Auswählen]
    [13-01-2019 14:47:28] E_WARNING : LoggingManager: Use of undefined constant MODULE_PAYMENT_AM_APA_POPUP - assumed 'MODULE_PAYMENT_AM_APA_POPUP' (this will throw an Error in a future version of PHP) in File: /var/shop/htdocs/shop/AmazonLoginAndPay/js/main.php on Line: 54

    Trifft aber auf relativ viele Module zu, auch im Admin.

    Vielen Dank.
    Grüße
    Christian

    Linkback: https://www.modified-shop.org/forum/index.php?topic=39902.0

    noRiddle (revilonetz)

    • Experte
    • Beiträge: 13.990
    • Geschlecht:
    Re: PHP 7.2 Warning "Use of undefined constant"
    Antwort #1 am: 15. Januar 2019, 14:01:11
    [...]
    Trifft aber auf relativ viele Module zu, auch im Admin.
    [...]
    • Geht das ein bisschen präziser ?
    • Da es im Shop kein Verzeichnis namens /AmazonLoginAndPay/ gibt handelt es sich offensichtlich um eine Erweiterung. Das ist also kein modified-Problem
    Gruß,
    noRiddle

    wagners

    • Mitglied
    • Beiträge: 107
    • Geschlecht:
    Re: PHP 7.2 Warning "Use of undefined constant"
    Antwort #2 am: 15. Januar 2019, 14:07:11
    Das Zitat bezieht sich auf diverse Module, die im Core standardmäßig enthalten sind.

    Dazu muss man nur mal (bei eingeschaltetem PHP 7.2) auf die Modulseite der Zusammenfassung gehen, schon wird das Log überspült mit dieser Warnung:

    Code: XML  [Auswählen]
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_SUBTOTAL_TITLE - assumed 'MODULE_ORDER_TOTAL_SUBTOTAL_TITLE' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_subtotal.php on Line: 24
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 264
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #1 - /home/www/2042/admin/modules.php called at Line 322
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_SUBTOTAL_DESCRIPTION - assumed 'MODULE_ORDER_TOTAL_SUBTOTAL_DESCRIPTION' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_subtotal.php on Line: 25
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 264
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #1 - /home/www/2042/admin/modules.php called at Line 322
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_DISCOUNT_TITLE - assumed 'MODULE_ORDER_TOTAL_DISCOUNT_TITLE' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_discount.php on Line: 26
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 264
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #1 - /home/www/2042/admin/modules.php called at Line 322
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_DISCOUNT_DESCRIPTION - assumed 'MODULE_ORDER_TOTAL_DISCOUNT_DESCRIPTION' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_discount.php on Line: 27
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 264
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #1 - /home/www/2042/admin/modules.php called at Line 322
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_SHIPPING_TITLE - assumed 'MODULE_ORDER_TOTAL_SHIPPING_TITLE' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_shipping.php on Line: 26
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 264
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #1 - /home/www/2042/admin/modules.php called at Line 322
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_SHIPPING_DESCRIPTION - assumed 'MODULE_ORDER_TOTAL_SHIPPING_DESCRIPTION' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_shipping.php on Line: 27
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 264
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #1 - /home/www/2042/admin/modules.php called at Line 322
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_SUBTOTAL_NO_TAX_TITLE - assumed 'MODULE_ORDER_TOTAL_SUBTOTAL_NO_TAX_TITLE' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_subtotal_no_tax.php on Line: 27
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 264
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #1 - /home/www/2042/admin/modules.php called at Line 322
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_SUBTOTAL_NO_TAX_DESCRIPTION - assumed 'MODULE_ORDER_TOTAL_SUBTOTAL_NO_TAX_DESCRIPTION' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_subtotal_no_tax.php on Line: 28
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 264
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #1 - /home/www/2042/admin/modules.php called at Line 322
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_TAX_TITLE - assumed 'MODULE_ORDER_TOTAL_TAX_TITLE' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_tax.php on Line: 25
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 264
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #1 - /home/www/2042/admin/modules.php called at Line 322
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_TAX_DESCRIPTION - assumed 'MODULE_ORDER_TOTAL_TAX_DESCRIPTION' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_tax.php on Line: 26
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 264
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #1 - /home/www/2042/admin/modules.php called at Line 322
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_TOTAL_TITLE - assumed 'MODULE_ORDER_TOTAL_TOTAL_TITLE' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_total.php on Line: 24
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 264
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #1 - /home/www/2042/admin/modules.php called at Line 322
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_TOTAL_DESCRIPTION - assumed 'MODULE_ORDER_TOTAL_TOTAL_DESCRIPTION' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_total.php on Line: 25
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 264
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #1 - /home/www/2042/admin/modules.php called at Line 322
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_PS_FEE_STATUS - assumed 'MODULE_ORDER_TOTAL_PS_FEE_STATUS' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_ps_fee.php on Line: 41
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_PS_FEE_SORT_ORDER - assumed 'MODULE_ORDER_TOTAL_PS_FEE_SORT_ORDER' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_ps_fee.php on Line: 42
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_BILLSAFE_STATUS - assumed 'MODULE_ORDER_TOTAL_BILLSAFE_STATUS' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_billsafe.php on Line: 41
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_BILLSAFE_SORT_ORDER - assumed 'MODULE_ORDER_TOTAL_BILLSAFE_SORT_ORDER' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_billsafe.php on Line: 42
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_PAYPALINSTALLMENT_FEE_STATUS - assumed 'MODULE_ORDER_TOTAL_PAYPALINSTALLMENT_FEE_STATUS' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_paypalinstallment_fee.php on Line: 29
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_PAYPALINSTALLMENT_FEE_SORT_ORDER - assumed 'MODULE_ORDER_TOTAL_PAYPALINSTALLMENT_FEE_SORT_ORDER' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_paypalinstallment_fee.php on Line: 30
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Declaration of BillpayPayLater::_getStaticLimit($config) should be compatible with billpayBase::_getStaticLimit() in File: /home/www/2042/includes/modules/payment/billpaypaylater.php on Line: 7
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/includes/external/billpay/base/billpayBase.php called at Line 210
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #1 - /home/www/2042/includes/modules/order_total/ot_z_paylater_fee.php called at Line 20
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #2 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Declaration of BillpayPayLater::_getMinValue($config) should be compatible with billpayBase::_getMinValue() in File: /home/www/2042/includes/modules/payment/billpaypaylater.php on Line: 7
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/includes/external/billpay/base/billpayBase.php called at Line 210
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #1 - /home/www/2042/includes/modules/order_total/ot_z_paylater_fee.php called at Line 20
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #2 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant FILENAME_CHECKOUT_PROCESS - assumed 'FILENAME_CHECKOUT_PROCESS' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/external/billpay/base/billpayBase.php on Line: 169
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/includes/modules/payment/billpaypaylater.php called at Line 22
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #1 - /home/www/2042/includes/modules/order_total/ot_z_paylater_fee.php called at Line 20
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #2 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Declaration of BillPayTransactionCredit::onDisplayPdf($pdf, $orderId, $bankDataQuery) should be compatible with billpayBase::onDisplayPdf() in File: /home/www/2042/includes/modules/payment/billpaytransactioncredit.php on Line: 6
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/includes/external/billpay/base/billpayBase.php called at Line 206
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #1 - /home/www/2042/includes/modules/order_total/ot_z_bpytc_fee.php called at Line 20
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #2 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Declaration of BillPayTransactionCredit::_getStaticLimit($config) should be compatible with billpayBase::_getStaticLimit() in File: /home/www/2042/includes/modules/payment/billpaytransactioncredit.php on Line: 6
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/includes/external/billpay/base/billpayBase.php called at Line 206
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #1 - /home/www/2042/includes/modules/order_total/ot_z_bpytc_fee.php called at Line 20
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #2 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Declaration of BillPayTransactionCredit::_getMinValue($config) should be compatible with billpayBase::_getMinValue() in File: /home/www/2042/includes/modules/payment/billpaytransactioncredit.php on Line: 6
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/includes/external/billpay/base/billpayBase.php called at Line 206
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #1 - /home/www/2042/includes/modules/order_total/ot_z_bpytc_fee.php called at Line 20
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #2 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Declaration of BillPayTransactionCredit::getPayUntilText($bank_data, $currency) should be compatible with billpayBase::getPayUntilText() in File: /home/www/2042/includes/modules/payment/billpaytransactioncredit.php on Line: 6
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/includes/external/billpay/base/billpayBase.php called at Line 206
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #1 - /home/www/2042/includes/modules/order_total/ot_z_bpytc_fee.php called at Line 20
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #2 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_KLARNA_FEE_STATUS - assumed 'MODULE_ORDER_TOTAL_KLARNA_FEE_STATUS' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_klarna_fee.php on Line: 78
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_KLARNA_FEE_SORT_ORDER - assumed 'MODULE_ORDER_TOTAL_KLARNA_FEE_SORT_ORDER' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_klarna_fee.php on Line: 79
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_KLARNA_FEE_TAX_CLASS - assumed 'MODULE_ORDER_TOTAL_KLARNA_FEE_TAX_CLASS' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_klarna_fee.php on Line: 80
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_LOWORDERFEE_STATUS - assumed 'MODULE_ORDER_TOTAL_LOWORDERFEE_STATUS' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_loworderfee.php on Line: 27
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_LOWORDERFEE_SORT_ORDER - assumed 'MODULE_ORDER_TOTAL_LOWORDERFEE_SORT_ORDER' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_loworderfee.php on Line: 28
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_PAYMENT_NUMBER - assumed 'MODULE_ORDER_TOTAL_PAYMENT_NUMBER' (this will throw an Error in a future version of PHP) in File: /home/www/2042/lang/german/modules/order_total/ot_payment.php on Line: 67
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 338
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_PAYMENT_STATUS - assumed 'MODULE_ORDER_TOTAL_PAYMENT_STATUS' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_payment.php on Line: 39
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_PAYMENT_SHOW_IN_CHECKOUT_PAYMENT - assumed 'MODULE_ORDER_TOTAL_PAYMENT_SHOW_IN_CHECKOUT_PAYMENT' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_payment.php on Line: 50
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_GV_STATUS - assumed 'MODULE_ORDER_TOTAL_GV_STATUS' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_gv.php on Line: 41
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_GV_SORT_ORDER - assumed 'MODULE_ORDER_TOTAL_GV_SORT_ORDER' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_gv.php on Line: 42
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_GV_INC_SHIPPING - assumed 'MODULE_ORDER_TOTAL_GV_INC_SHIPPING' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_gv.php on Line: 43
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_GV_INC_TAX - assumed 'MODULE_ORDER_TOTAL_GV_INC_TAX' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_gv.php on Line: 44
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_GV_CALC_TAX - assumed 'MODULE_ORDER_TOTAL_GV_CALC_TAX' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_gv.php on Line: 45
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_GV_CREDIT_TAX - assumed 'MODULE_ORDER_TOTAL_GV_CREDIT_TAX' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_gv.php on Line: 46
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_GV_TAX_CLASS - assumed 'MODULE_ORDER_TOTAL_GV_TAX_CLASS' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_gv.php on Line: 47
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_COUPON_STATUS - assumed 'MODULE_ORDER_TOTAL_COUPON_STATUS' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_coupon.php on Line: 54
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_COUPON_SORT_ORDER - assumed 'MODULE_ORDER_TOTAL_COUPON_SORT_ORDER' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_coupon.php on Line: 55
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_COUPON_CALC_TAX - assumed 'MODULE_ORDER_TOTAL_COUPON_CALC_TAX' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_coupon.php on Line: 58
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_COUPON_TAX_CLASS - assumed 'MODULE_ORDER_TOTAL_COUPON_TAX_CLASS' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_coupon.php on Line: 59
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_COD_FEE_STATUS - assumed 'MODULE_ORDER_TOTAL_COD_FEE_STATUS' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_cod_fee.php on Line: 41
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 345
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_COD_FEE_SORT_ORDER - assumed 'MODULE_ORDER_TOTAL_COD_FEE_SORT_ORDER' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_cod_fee.php on Line: 42
    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Backtrace #0 - /home/www/2042/admin/modules.php called at Line 345

    Aber modified 2.0.4.2 hat ja auch noch keine offizielle PHP-7.2-Freigabe, daher ist die Nutzung eh auf eigenes Risiko.

    Timm

    • Fördermitglied
    • Beiträge: 6.258
    Re: PHP 7.2 Warning "Use of undefined constant"
    Antwort #3 am: 15. Januar 2019, 14:59:28
    Das Amazon Modul schmeißt übrigens schon unter PHP 7.1 ausreichend warnings. Hatte ich im entsprechenden Thread zum Modul schonmal angesprochen. Schien aber zu dem Zeitpunkt nicht so interessant zu sein.

    hpzeller

    • Experte
    • Beiträge: 4.129
    • Geschlecht:
    Re: PHP 7.2 Warning "Use of undefined constant"
    Antwort #4 am: 15. Januar 2019, 19:48:42
    Zitat
    E_WARNING : LoggingManager: Use of undefined constant

    Der Grund für obige E_WARNING bei PHP 7.2.x bzw. E_NOTICE bei PHP 7.1.x ist nicht etwa das die Konstanten nicht definiert wären, sondern das sie wie z.B. in der Datei includes/modules/order_total/ot_subtotal.php Zeile 24 nicht in Anführungszeichen stehen, also so

    Code: PHP  [Auswählen]
    $this->title = MODULE_ORDER_TOTAL_SUBTOTAL_TITLE;

    anstatt so

    Code: PHP  [Auswählen]
    $this->title = "MODULE_ORDER_TOTAL_SUBTOTAL_TITLE";

    dort stehen.

    Näheres hier -> http://php.net/manual/de/migration72.deprecated.php

    PS:
    Das obige Problem dürfte viele Zuweisungen von Konstanten in der Shopsoftware betreffen und ab PHP 7.3.x werfen sie einen Error, siehe Link.

    Gruss
    Hanspeter

    noRiddle (revilonetz)

    • Experte
    • Beiträge: 13.990
    • Geschlecht:
    Re: PHP 7.2 Warning "Use of undefined constant"
    Antwort #5 am: 16. Januar 2019, 06:39:31
    Mit Verlaub, die von dir angegebene Stelle ist zumindest nicht aus dem genannten Grund die Ursache.
    Wenn MODULE_ORDER_TOTAL_SUBTOTAL_TITLE definiert ist
    - was in /lang/SPRACHE/modules/order_total/ot_subtotal.php der Fall sein dürfte -
    ist
    Code: PHP  [Auswählen]
    $this->title = MODULE_ORDER_TOTAL_SUBTOTAL_TITLE;
    also ohne Anführungsstriche, völlig korrekt.

    Anführungsstriche beim Aufruf einer Konstanten wären nötig wenn man sie mittels constant() so aufriefe:
    Code: PHP  [Auswählen]
    constant("MODULE_ORDER_TOTAL_SUBTOTAL_TITLE");

    Der Grund des E_WARNING dürfte eher folgender sein:
    Die Funktion check_update_needed() in welcher das E_WARNING geworfen wird wird aufgerufen bevor das zugehörige o.g. language-File includiert wird; und somit ist die Konstante aus Sicht des Skriptes wirklich noch nicht definiert.

    In andere Fällen könnte ein solches E_WARNING  z.B. auch geworfen werden weil ein Array-Key nicht in Quotes steht
    - z.B. $_GET[action] anstatt $_GET['action'] -
    und PHP somit von einer Konstanten anstatt von einem String ausgeht.

    Ein versehntlich vergessenes $ vor dem Aufruf eines Variablen-Namens wirft ebenfalls ein solches E_WARNING.

    Gruß,
    noRiddle

    Cookie

    • Fördermitglied
    • Beiträge: 274
    Re: PHP 7.2 Warning "Use of undefined constant"
    Antwort #6 am: 16. Januar 2019, 14:20:41
    Hallo noRiddle,

    der Aufruf der Konstanten in dem Beispiel ist sicherlich richtig.

    Das Problem der aktuellen PHP Versionen ist eher, dass die Konstanten nicht sauber definiert sind. Daher die PHP Warnings.

    Ich versuche das mal zu lösen und poste dann die Anpassungen.

    Grüße
    Christian

    hpzeller

    • Experte
    • Beiträge: 4.129
    • Geschlecht:
    Re: PHP 7.2 Warning "Use of undefined constant"
    Antwort #7 am: 17. Januar 2019, 10:05:06
    Nachtrag und Korrektur zu Antwort #4

    So wie es aussieht habe ich mich mit diesem Codevorschlag etwas vertan.

    Code: PHP  [Auswählen]
    $this->title = "MODULE_ORDER_TOTAL_SUBTOTAL_TITLE";

    Jetzt habe ich mir die Datei admin/module.php etwas genauer angeschaut und dabei festgestellt das es verschiedene Ursachen gibt die zu der längeren Lieste von E_WARNINGs diese Art

    [15-01-2019 14:04:29] E_WARNING : LoggingManager: Use of undefined constant MODULE_ORDER_TOTAL_SUBTOTAL_TITLE - assumed 'MODULE_ORDER_TOTAL_SUBTOTAL_TITLE' (this will throw an Error in a future version of PHP) in File: /home/www/2042/includes/modules/order_total/ot_subtotal.php on Line: 24
    so wie sie wagners in Antwort #2 gepostet hat führt. Zum einen ist es das mehrfache instanziieren von Modulklassen, wobei für mich der Grund dafür nicht ersichtlich ist, mit und ohne zugehöriger Sprachdatei, so das teilweise die Sprachkonstanten nicht definiert sind und zum andern nicht installierte Module bei denen dann Konstanten wie z.B. MODULE_ORDER_TOTAL_PS_FEE_SORT_ORDER nicht definiert werden da sie in der Datenbanktabelle configuration gar nicht vorhanden sind.

    Eine einfach aber eigentlich nicht befriedigende Lösung sähe für mich  so aus.
    Die Zuweisungen der Konstanten in den Konstruktoren der Modulklassen, hier am Beispiel der class ot_subtotal, in der Datei includes/modules/order_total/ot_subtotal.php

    Code: PHP  [Auswählen]
          $this->code = 'ot_subtotal';
          $this->title = MODULE_ORDER_TOTAL_SUBTOTAL_TITLE;
          $this->description = MODULE_ORDER_TOTAL_SUBTOTAL_DESCRIPTION;
          $this->enabled = ((MODULE_ORDER_TOTAL_SUBTOTAL_STATUS == 'true') ? true : false);
          $this->sort_order = MODULE_ORDER_TOTAL_SUBTOTAL_SORT_ORDER;

    mit diesem Code zu ersetzen.

    Code: PHP  [Auswählen]
          $this->title = $this->title = defined('MODULE_ORDER_TOTAL_SUBTOTAL_TITLE') ? MODULE_ORDER_TOTAL_SUBTOTAL_TITLE : '';
          $this->description = defined('MODULE_ORDER_TOTAL_SUBTOTAL_DESCRIPTION') ? MODULE_ORDER_TOTAL_SUBTOTAL_DESCRIPTION : '';
          $this->enabled = (((defined('MODULE_ORDER_TOTAL_SUBTOTAL_STATUS') ? MODULE_ORDER_TOTAL_SUBTOTAL_STATUS : NULL) == 'true') ? true : false);
          $this->sort_order = defined('MODULE_ORDER_TOTAL_SUBTOTAL_SORT_ORDER') ? MODULE_ORDER_TOTAL_SUBTOTAL_SORT_ORDER : '';

    PS:
    Oben habe ich geschrieben, dass ich die Lösung eigentlich nicht für befriedigend halte, ein Grund dafür ist folgender. In der  Datei admin/module.php ist an mehreren Stellen, aber nicht an ausreichend vielen, folgende Codesequenz zu finden.

    Code: PHP  [Auswählen]
          if (is_file(DIR_FS_LANGUAGES . $_SESSION['language'] . '/modules/' . $module_type . '/' . $file)) {
            include_once(DIR_FS_LANGUAGES . $_SESSION['language'] . '/modules/' . $module_type . '/' . $file);
          }

    Obigen Code könnte man aber weglassen, wenn man stattdessen in den Moduldeiten jeweils vor der Klassendefinition folgenden beispielhaften Code einfügen würde.

    Code: PHP  [Auswählen]
    include_once(DIR_FS_LANGUAGES . $_SESSION['language'] . '/modules/order_total/ot_subtotal.php');

    Auf diese Weise ist dann nämlich gewährleistet, dass wenn man eine Moduldatei in ein Skript einbindet auch die zugehörige Sprachdatei immer mit eingebunden wird und man muss sich nicht mehr, wie das jetzt z.B. im Skript admin/module.php der Fall ist, speziell darum kümmern.

    Gruss
    Hanspeter

    noRiddle (revilonetz)

    • Experte
    • Beiträge: 13.990
    • Geschlecht:
    Re: PHP 7.2 Warning "Use of undefined constant"
    Antwort #8 am: 17. Januar 2019, 11:18:35
    Es gibt sicherlich mehere Möglichkeiten das zu lösen.
    Ich denke, daß es, um größere Änderungen zu vermeiden, ausreichen würde den folgenden Code-Teil aus der /admin/modules.php
    Code: PHP  [Auswählen]
                  $info = check_update_needed($module_type);
                  if (count($info) > 0) {
                    echo '<div class="error_message">'.TEXT_MODULE_UPDATE_NEEDED.'<ul>'.implode('', $info).'</ul></div>';
                  }

    unter die schließende Klammer dieses Blocks setzen
    Code: PHP  [Auswählen]
                  if ($dir = @dir($module_directory)) {
                      //SOME_CODE
                  }

    Könnte das mal jemand testen ?,
    du Cookie ?

    Gruß,
    noRiddle

    Tomcraft

    • modified Team
    • Gravatar
    • Beiträge: 46.369
    • Geschlecht:
    Re: PHP 7.2 Warning "Use of undefined constant"
    Antwort #9 am: 17. Januar 2019, 11:32:24
    Verschoben in die "Bastelecke", denn aktuell unterstützen wir nur PHP bis 7.1, siehe: Mindestvoraussetzungen

    Grüße

    Torsten

    noRiddle (revilonetz)

    • Experte
    • Beiträge: 13.990
    • Geschlecht:
    Re: PHP 7.2 Warning "Use of undefined constant"
    Antwort #10 am: 17. Januar 2019, 11:38:33
    Jau, wissen wir ja.
    Der Thread kann aber ja trotzdem förderlich sein, für Zukünftiges und für Betreiber die schon jetzt auf PHP 7.2 laufen wollen.
    Dem hast du ja auch nicht widersprochen.

    Gruß,
    noRiddle

    Tomcraft

    • modified Team
    • Gravatar
    • Beiträge: 46.369
    • Geschlecht:
    Re: PHP 7.2 Warning "Use of undefined constant"
    Antwort #11 am: 17. Januar 2019, 11:40:13
    Das ist unbestritten. ;-)

    Grüße

    Torsten

    Timm

    • Fördermitglied
    • Beiträge: 6.258
    Re: PHP 7.2 Warning "Use of undefined constant"
    Antwort #12 am: 17. Januar 2019, 13:14:37
    [...] denn aktuell unterstützen wir nur PHP bis 7.1, [...]

    Was ehrlich gesagt nicht gerade aktuell ist. Für PHP 7.1 gibts keine Verbesserungen mehr, sondern nur noch Sicherheitsupdates. Sprich die Verbesserungen gehen an uns komplett vorbei bis zu einem Update der Shopversion.
    Vielleicht sollte man bei den kurzen Laufzeiten der PHP Versionen von nur noch 1 Jahr darüber nachdenken die Shopversion gleich für 7.3 fit zu machen.

    Hatte hier im Forum auch schon gelesen, dass es als Ausschlusskriterium für einen Shopwechsel hin zu modified angegeben wurde, dass keine aktuelle PHP Version mit dem Shop läuft.

    [ Für Gäste sind keine Dateianhänge sichtbar ]

    Gruß Timm

    noRiddle (revilonetz)

    • Experte
    • Beiträge: 13.990
    • Geschlecht:
    Re: PHP 7.2 Warning "Use of undefined constant"
    Antwort #13 am: 17. Januar 2019, 14:17:42
    ...
    Hatte hier im Forum auch schon gelesen, dass es als Ausschlusskriterium für einen Shopwechsel hin zu modified angegeben wurde, dass keine aktuelle PHP Version mit dem Shop läuft.
    ...

    Daß "keine aktuelle PHP Version mit dem Shop läuft" ist 1. nicht richtig
    - PHP 7.1 ist aktuell (wobei man den Begriff "aktuell" natürlich dehnen und sehr rigoros auslegen kann -
    und 2. braucht alles seine Zeit.
    Auch andere Shop-Systeme unterstützen mom. noch nur bedingt PHP 7.2 (also auch mit E_WARNING und E_NOTICES). Dazu gehören auch team- und finanz-mäßig weit besser bestückte Systeme.
    Eine solche Argumentation hat entweder mangelndes Wissen, und somit Nachgequatsche, als Ursache oder andere verborgene, unlautere Intentionen.

    *NACHTRAG*
    Vorbeugend sei gesagt:
    Mit "solche Argumentation" meine ich Personen die das "als Ausschlusskriterium für einen Shopwechsel hin zu modified" sehen, also nicht deine Wenigkeit die hier lediglich zitiert.

    Gruß,
    noRiddle

    Cookie

    • Fördermitglied
    • Beiträge: 274
    Re: PHP 7.2 Warning "Use of undefined constant"
    Antwort #14 am: 20. Januar 2019, 11:37:51
    Hallo,

    ich glaube Grundsatzdiskussionen helfen hier nicht weiter.

    Das Problem ist, dass z.B. bei Ubuntu PHP 7.2 schon der Standard in der aktuellen stable Version ist. Damit wird der Bedarf des PHP 7.2 Support sicherlich steigen.

    Alle PHP Warnings zu prüfen wird allerdings recht viel Aufwand. Es gibt viele Stellen, wo Konstanten nicht definiert sind. Der Shop läuft sonst aber auch auf 7.2. Es wird nur schwierig richtige Warnings zu sehen, wenn das Log mir Konstantenwarnungen voll ist. ;-).

    Ich glaube aber auch, dass das Entwickler Team alles dafür tut, modified auf dem aktuellen Stand zu halten. Der Tag hat aber leider nur 24 Stunden.

    Grüße
    Christian
    Templateshop - Eine große Auswahl an neuen und modernen Templates für die modified eCommerce Shopsoftware
    1 Antworten
    3368 Aufrufe
    13. September 2011, 14:57:13 von DokuMan
    4 Antworten
    2746 Aufrufe
    06. Dezember 2010, 08:31:53 von voodoopupp
    1 Antworten
    1987 Aufrufe
    26. Juli 2010, 05:59:51 von DokuMan