mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
fix sum type
This commit is contained in:
parent
9c02749567
commit
8fd2cca24b
|
|
@ -443,7 +443,7 @@ final class ReadMapper extends DataMapperAbstract
|
|||
/**
|
||||
* Sum the number of elements
|
||||
*
|
||||
* @return int
|
||||
* @return int|float
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
|
@ -456,9 +456,12 @@ final class ReadMapper extends DataMapperAbstract
|
|||
]
|
||||
);
|
||||
|
||||
var_dump($query->execute()?->fetchColumn());
|
||||
$result = $query->execute()?->fetchColumn();
|
||||
if (empty($result)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return $query->execute()?->fetchColumn();
|
||||
return \stripos($result, '.') ? (float) $result : (int) $result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user