mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-27 03:39:57 +03:00
issue #1845 update Smarty from 4.1.0 to 4.3.1 (compat PHP 8.2)
This commit is contained in:
parent
ea53750bfe
commit
7752138b04
186 changed files with 4513 additions and 4665 deletions
25
include/smarty/libs/plugins/modifier.explode.php
Normal file
25
include/smarty/libs/plugins/modifier.explode.php
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue