aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlolcat <will@lolcat.ca>2024-11-19 09:22:58 -0500
committerlolcat <will@lolcat.ca>2024-11-19 09:22:58 -0500
commit920b9d5b3f6173c501712a71b69b3511db4a7a2a (patch)
tree5a7a1974ec8532383e25601bb663ff6f9e065e13
parent9cd369ac08683575784acb5f1563c2698026a838 (diff)
brave crash fix
-rw-r--r--scraper/brave.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/scraper/brave.php b/scraper/brave.php
index ee0c37d..2e82890 100644
--- a/scraper/brave.php
+++ b/scraper/brave.php
@@ -673,7 +673,10 @@ class brave{
$table["Address"] = $result["location"]["postal_address"]["displayAddress"];
}
- if(isset($result["location"]["rating"])){
+ if(
+ isset($result["location"]["rating"]) &&
+ $result["location"]["rating"] != "void 0"
+ ){
$table["Rating"] =
$result["location"]["rating"]["ratingValue"] . "/" .
@@ -681,13 +684,19 @@ class brave{
number_format($result["location"]["rating"]["reviewCount"]) . " votes)";
}
- if(isset($result["location"]["contact"]["telephone"])){
+ if(
+ isset($result["location"]["contact"]["telephone"]) &&
+ $result["location"]["contact"]["telephone"] != "void 0"
+ ){
$table["Phone number"] =
$result["location"]["contact"]["telephone"];
}
- if(isset($result["location"]["price_range"])){
+ if(
+ isset($result["location"]["price_range"]) &&
+ $result["location"]["price_range"] != "void 0"
+ ){
$table["Price"] =
$result["location"]["price_range"];
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage