mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-18 16:39:24 +01:00
* Prevent deprecation notices for implode, json_encode and substr modifiers. * unit tests
16 lines
310 B
PHP
16 lines
310 B
PHP
<?php
|
|
/**
|
|
* Smarty plugin
|
|
*
|
|
* @package Smarty
|
|
* @subpackage PluginsModifier
|
|
*/
|
|
|
|
function smarty_modifier_implode($values, $separator = '')
|
|
{
|
|
if (is_array($separator)) {
|
|
return implode((string) ($values ?? ''), (array) $separator);
|
|
}
|
|
return implode((string) ($separator ?? ''), (array) $values);
|
|
}
|