﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking
1627	Problem mit Smarty replace Funktion	Torsten Riemer	somebody	"Aufgefallen ist mir das bei einem Shop, der identisch zu einem anderen Shop des Kunden ist.

Ausgangslage:
- Beide Shops 2.0.4.2
- Beide Shops latin1
- Beide Shop haben das selbe aktuelle responsive Template von uns, wo an diversen Stellen die Smarty Funktion ""replace"" verwendet wird, unter anderen zur Ersetzung von &raquo; gegen FontAwesome in der Breadcrumb.
- Der eine Shop läuft unter PHP 5.6.40
- Der andere unter PHP 7.1.28

Im PHP 5.6.40 Shop wird die Breadcrumb auf der Seite ""Privatsphäre und Datenschutz"" (Umlaut '''nicht''' als Entity in Tabelle ""content_manager"" Spalte ""content_title"") angezeigt.

Im PHP 7.1.28 Shop wird die Breadcrumb auf der Seite ""Privatsphäre und Datenschutz"" (Umlaute '''nicht''' als Entities in Tabelle ""content_manager"" Spalte ""content_title"") '''nicht''' angezeigt.

Speicher ich im PHP 7.1.28 Shop den Umlaut (ä) als Entity in Tabelle ""content_manager"" Spalte ""content_title"", dann wird auch hier die Breadcrumb angezeigt.

Fehlermeldung im Log des PHP 7.1.28 Shops:
{{{
[2019-04-30 16:49:02]	[warning]	[modified]	[pid:29757]	implode(): Invalid arguments passed in File: /.../.../.../.../.../includes/external/smarty/smarty_3/plugins/shared.mb_str_replace.php on Line: 49	{}	{}
[2019-04-30 16:49:02]	[warning]	[modified]	[pid:29757]	Backtrace #0 - /.../.../.../.../.../includes/external/smarty/smarty_3/plugins/modifier.replace.php called at Line 35	{}	{}
[2019-04-30 16:49:02]	[warning]	[modified]	[pid:29757]	Backtrace #1 - /.../.../.../.../.../templates_c/d925352bc611d724dc57d293e10216c66670efff_0.file.index.html.php called at Line 225	{}	{}
[2019-04-30 16:49:02]	[warning]	[modified]	[pid:29757]	Backtrace #2 - /.../.../.../.../.../includes/external/smarty/smarty_3/sysplugins/smarty_template_resource_base.php called at Line 123	{}	{}
[2019-04-30 16:49:02]	[warning]	[modified]	[pid:29757]	Backtrace #3 - /.../.../.../.../.../includes/external/smarty/smarty_3/sysplugins/smarty_template_compiled.php called at Line 114	{}	{}
[2019-04-30 16:49:02]	[warning]	[modified]	[pid:29757]	Backtrace #4 - /.../.../.../.../.../includes/external/smarty/smarty_3/sysplugins/smarty_internal_template.php called at Line 206	{}	{}
[2019-04-30 16:49:02]	[warning]	[modified]	[pid:29757]	Backtrace #5 - /.../.../.../.../.../includes/external/smarty/smarty_3/sysplugins/smarty_internal_templatebase.php called at Line 232	{}	{}
[2019-04-30 16:49:02]	[warning]	[modified]	[pid:29757]	Backtrace #6 - /.../.../.../.../.../includes/external/smarty/smarty_3/sysplugins/smarty_internal_templatebase.php called at Line 134	{}	{}
[2019-04-30 16:49:02]	[warning]	[modified]	[pid:29757]	Backtrace #7 - /.../.../.../.../.../shop_content.php called at Line 124	{}	{}
}}}
Markus sagte mir dann, dass Gerhard das erst vor kurzem am 25.04.2019 in einem anderen Shop (läuft auch genau unter PHP 7.1.28) wie folgt in der ""/includes/external/smarty/smarty_3/plugins/shared.mb_str_replace.php"" korrigiert hatte:

Suche:
{{{
$subject = implode($replace, $parts);
}}}
Ersetze mit:
{{{
$subject = str_replace($search, $replace, $subject);
}}}
Das führte auch bei meinem Problemshop zur Lösung!"	Bug/Fehler	closed	hoch	modified-shop-2.0.5.0	Shop	2.0.4.2	fixed				
