From 088057521a2fe8a3f846138fd7056355e48a787e Mon Sep 17 00:00:00 2001 From: Alec M Date: Thu, 15 Jul 2021 11:50:01 -0400 Subject: [PATCH] Use strpos for Valve Train Design --- classes/nhtsa.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/nhtsa.class.php b/classes/nhtsa.class.php index 9558045..7e25922 100644 --- a/classes/nhtsa.class.php +++ b/classes/nhtsa.class.php @@ -134,9 +134,9 @@ public static function parseDecode(array $result = Array()) : ?array } else if (isset($result['Displacement (CC)']) && !empty($result['Displacement (CC)'])) { $parsed_result['Engine'] .= " (". number_format($result['Displacement (CC)']) ."cc)"; } - if (isset($result["Valve Train Design"]) && !empty($result["Valve Train Design"]) && strtolower($result["Valve Train Design"]) == "dual overhead cam (dohc)") { + if (isset($result["Valve Train Design"]) && !empty($result["Valve Train Design"]) && strpos($result["Valve Train Design"], "DOHC") !== false) { $parsed_result['Engine'] .= " (DOHC)"; - } else if (isset($result["Valve Train Design"]) && !empty($result["Valve Train Design"]) && strtolower($result["Valve Train Design"]) == "single overhead cam (sohc)") { + } else if (isset($result["Valve Train Design"]) && !empty($result["Valve Train Design"]) && strpos($result["Valve Train Design"], "SOHC") !== false) { $parsed_result['Engine'] .= " (SOHC)"; } if (isset($parsed_result['Engine'])) {