Skip to content

A free open source IT asset/license management system

More nuance to human boolean check

snipe6f25ed3c59ca
diff --git a/app/Importer/Importer.php b/app/Importer/Importer.php
index 6f2816c7af..0316de04f1 100644
--- a/app/Importer/Importer.php
+++ b/app/Importer/Importer.php
@@ -492,6 +492,16 @@ abstract class Importer
public function fetchHumanBoolean($value)
{
+ $true = [
+ 'yes',
+ 'y',
+ 'true',
+ ];
+
+ if (in_array(strtolower($value), $true)) {
+ return 1;
+ }
+
return (int) filter_var($value, FILTER_VALIDATE_BOOLEAN);
}
@@ -528,6 +538,7 @@ abstract class Importer
return null;
}
+
/**
* Fetch an existing manager
*