Check for numeric

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe
2025-08-20 11:00:18 +01:00
parent 2a37aa3b49
commit 9c06ff3899
+1 -1
View File
@@ -21,7 +21,7 @@ class SnipeModel extends Model
*/
public function setPurchaseCostAttribute($value)
{
if (is_float($value)) {
if (is_numeric($value)) {
//value is *already* a floating-point number. Just assign it directly
$this->attributes['purchase_cost'] = $value;
return;