square footage being parsed incorrectly
-
I noticed that single-listing.php is parsing the square feet from listing information incorrectly. It is attempting to parse the data using a comma as the delimiter, but our listing information includes a comma in the square feet when the square feet exceed 1000 (1,000). This may not even come up if your units are all smaller than 1000 square feet. Anyway, see below for my diff that shows a way to fix this.
--- single-listing.php.orig 2021-01-08 12:06:03.084135802 -0800 +++ single-listing.php.repaired 2021-01-08 12:04:58.853021387 -0800 @@ -63,7 +63,8 @@ $bed_bath_avail = explode("| ", $bed_bath_avail); if($bed_bath_avail){ if(strpos($bed_bath_avail[0], 'Sq.') !== false){ - $reversedParts = explode(',', strrev($bed_bath_avail[0])); + //$reversedParts = explode(',', strrev($bed_bath_avail[0])); + $reversedParts = explode(' ,', strrev($bed_bath_avail[0])); $place_area = strrev($reversedParts[0]); // get last part } if(count($bed_bath_avail) > 1){
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘square footage being parsed incorrectly’ is closed to new replies.