mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Merge branch 'ent-9257-13892-Error-al-mostrar-reporte-sin-datos' into 'develop'
Ent 9257 13892 error al mostrar reporte sin datos See merge request artica/pandorafms!5005
This commit is contained in:
commit
c0705fcce4
@ -146,7 +146,7 @@ class Event extends Entity
|
|||||||
* @param boolean $return_sql Return sql or execute it.
|
* @param boolean $return_sql Return sql or execute it.
|
||||||
* @param string $having Having.
|
* @param string $having Having.
|
||||||
*
|
*
|
||||||
* @return array|string|false Found events or SQL query or error.
|
* @return array Found events or SQL query or error.
|
||||||
* @throws \Exception On error.
|
* @throws \Exception On error.
|
||||||
*/
|
*/
|
||||||
public static function search(
|
public static function search(
|
||||||
@ -160,7 +160,7 @@ class Event extends Entity
|
|||||||
bool $return_sql=false,
|
bool $return_sql=false,
|
||||||
string $having=''
|
string $having=''
|
||||||
):array {
|
):array {
|
||||||
return \events_get_all(
|
$result = \events_get_all(
|
||||||
$fields,
|
$fields,
|
||||||
$filter,
|
$filter,
|
||||||
$offset,
|
$offset,
|
||||||
@ -171,6 +171,13 @@ class Event extends Entity
|
|||||||
$return_sql,
|
$return_sql,
|
||||||
$having
|
$having
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Always return an array.
|
||||||
|
if (empty($result) === true) {
|
||||||
|
$result = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user