| @@ -21,10 +21,12 @@ | ||
| 21 | 21 | * @param mixed $value Raw or PrettyEnums status value (anything non-string yields ''). |
| 22 | 22 | * @return string Lowercased, space-free comparison key. |
| 23 | 23 | */ |
| 24 | 24 | function mlsimport_normalize_status_enum( $value ) { |
| 25 | + // Non-string input has no comparable status; normalize to empty. | |
| 25 | 26 | if ( ! is_string( $value ) ) { |
| 26 | 27 | return ''; |
| 27 | 28 | } |
| 28 | 29 | |
| 30 | + // Trim, lowercase, then drop spaces so "Active Under Contract" == "ActiveUnderContract". | |
| 29 | 31 | return str_replace( ' ', '', strtolower( trim( $value ) ) ); |
| 30 | 32 | } |