mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
port some functions from streams
This commit is contained in:
@@ -3505,6 +3505,14 @@ function flatten_array_recursive($arr) {
|
||||
return($ret);
|
||||
}
|
||||
|
||||
// Turn $element into an array if it isn't already.
|
||||
function force_array($element) {
|
||||
if (empty($element)) {
|
||||
return [];
|
||||
}
|
||||
return (is_array($element)) ? $element : [$element];
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Highlight Text.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user