﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking
2100	Notwendig constant DIR_TMPL_CSS zu definieren für PHP8?	FräuleinGarn	Gerhard Waldemair	"Durch ein Zusatzmodul ist mir folgendes aufgefallen.

Man könnte auf die Idee kommen in callback/modulname/moduldatei.php ganz unten (in Bezug auf die logs unten, es steht in Zeile 8)


{{{
require_once 'includes/application_bottom.php';
}}}

einzubinden.

In includes/application_bottom.php steht 


{{{
// require theme based css
if (is_file('templates/'.CURRENT_TEMPLATE.'/css/general_bottom.css.php')) {
  require('templates/'.CURRENT_TEMPLATE.'/css/general_bottom.css.php');
}}}

Das führte in diesem Fall mit Php7.4 zu folgendem warning und unter PHP8 zum error:


{{{
[2021-09-27 05:43:02]	[warning]	[modified]	[pid:15764]	WARNING found for URL: /xxx/callback/modulname/moduldatei.php	{}	{}
[2021-09-27 05:43:02]	[warning]	[modified]	[pid:15764]	Use of undefined constant DIR_TMPL_CSS - assumed 'DIR_TMPL_CSS' (this will throw an Error in a future version of PHP) in File: /xxx/templates/tpl_modified_responsive/css/general_bottom.css.php on Line: 20	{}	{}
[2021-09-27 05:43:02]	[warning]	[modified]	[pid:15764]	Backtrace #0 - /xxx/includes/application_bottom.php called at Line 41	{}	{}
[2021-09-27 05:43:02]	[warning]	[modified]	[pid:15764]	Backtrace #1 - /xxx/callback/modulname/moduldatei.php called at Line 8	{}	{}
}}}

In besagtem Modul war die Einbindung der includes/application_bottom.php nicht nötig und wurde entfernt und der Fehler tritt nicht mehr auf. Eventuell führt das aber bei anderen Modulen zu Problemen, die die includes/application_bottom.php einbinden.

'''Deshalb die Frage, ob es notwendig wäre constant DIR_TMPL_CSS zu definieren für PHP8?'''

Ich hatte versucht das selbst weiter auszuprobieren mit meinen mangelnden PHP Kenntnissen und hatte nach anderen Modulen gesucht die diese Datei inkludieren. Fündig wurde ich bei Paypal Plus Link. Allerdings konnte ich es dort nicht weiter testen, da er schon vorher abbricht."	Frage	closed	normal	modified-shop-2.0.7.0	Module	2.0.6.0	fixed				
