SuiteCRM-Core/public/legacy/include/Smarty/plugins/modifier.explode.php
Clemente Raposo 5aa0daf046 Merge next into suite 8
Merge commit 'de4bf25cb3' into release/8.4.0-beta

# Conflicts:
#	public/legacy/data/SugarBean.php
#	public/legacy/include/Smarty/plugins/function.sugarvar.php
#	public/legacy/include/SugarDateTime.php
#	public/legacy/include/database/MysqliManager.php
#	public/legacy/modules/Alerts/metadata/listviewdefs.php
#	public/legacy/modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.php
#	public/legacy/modules/Trackers/metadata/SearchFields.php
#	public/legacy/modules/Trackers/metadata/listviewdefs.php
#	public/legacy/modules/UpgradeWizard/SugarMerge/EditViewMerge.php
#	public/legacy/suitecrm_version.php
2023-07-21 15:22:52 +01:00

25 lines
541 B
PHP

<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifier
*/
/**
* Smarty explode modifier plugin
* Type: modifier
* Name: explode
* Purpose: split a string by a string
*
* @param string $separator
* @param string $string
* @param int|null $limit
*
* @return array
*/
function smarty_modifier_explode($separator, $string, ?int $limit = null)
{
// provide $string default to prevent deprecation errors in PHP >=8.1
return explode($separator, $string ?? '', $limit ?? PHP_INT_MAX);
}