Debug v21

This commit is contained in:
Laurent Destailleur (aka Eldy)
2025-01-13 12:59:37 +01:00
parent 161aaf5f05
commit b05478b273

View File

@@ -33,7 +33,7 @@
*/ */
function dolStripPhpCode($str, $replacewith = '') function dolStripPhpCode($str, $replacewith = '')
{ {
$str = str_replace('<?=', '<?php', $str); $str = str_replace('<?=', '<?php echo', $str); // replace a bad practive
$newstr = ''; $newstr = '';
@@ -77,9 +77,9 @@ function dolStripPhpCode($str, $replacewith = '')
*/ */
function dolKeepOnlyPhpCode($str) function dolKeepOnlyPhpCode($str)
{ {
$str = str_replace('<?=', '<?php', $str); $str = str_replace('<?=', '<?php echo', $str);
$str = str_replace('<?php', '__LTINTPHP__', $str); $str = str_replace('<?php', '__LTINTPHP__', $str);
$str = str_replace('<?', '<?php', $str); // replace the short_open_tag. It is recommended to set this is Off in php.ini $str = str_replace('<?', '<?php', $str); // replace the short_open_tag. It is recommended to set this to Off in php.ini
$str = str_replace('__LTINTPHP__', '<?php', $str); $str = str_replace('__LTINTPHP__', '<?php', $str);
$newstr = ''; $newstr = '';