diff --git a/lib/zin/core/wg.func.php b/lib/zin/core/wg.func.php index 7d0d36c829..ebd4049e3d 100644 --- a/lib/zin/core/wg.func.php +++ b/lib/zin/core/wg.func.php @@ -109,8 +109,9 @@ function setTag(string $id): directive * @param mixed $value * @return directive */ -function setData(string|array $name, mixed $value = null): directive +function setData(null|string|array $name, mixed $value = null): directive { + if($name === null) return set(null); $map = is_array($name) ? $name : array($name => $value); $attrs = array(); foreach($map as $key => $value)