mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Fix type error when null is passed to cut_str()
https://xetown.com/questions/1793588
This commit is contained in:
parent
d02ea160c1
commit
7132ef4c00
1 changed files with 1 additions and 0 deletions
|
|
@ -435,6 +435,7 @@ function isSiteID($domain): bool
|
|||
*/
|
||||
function cut_str($string, $cut_size = 0, $tail = '...'): string
|
||||
{
|
||||
$string = (string)$string;
|
||||
if($cut_size < 1 || !$string)
|
||||
{
|
||||
return $string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue