Просмотр исходного кода

Fix (#604)

* Add Not Found Check

* Add Not Found Check
OwN-3m-All 3 лет назад
Родитель
Сommit
69e5471e97
1 измененных файлов с 5 добавлено и 2 удалено
  1. 5 2
      modules/extras/extras.php

+ 5 - 2
modules/extras/extras.php

@@ -437,8 +437,11 @@ function exec_ogp_module()
 			if(!isset($contents) || empty($contents) || filesize($used_file) == 0 || filesize($used_file) == 1){
 			if(!isset($contents) || empty($contents) || filesize($used_file) == 0 || filesize($used_file) == 1){
 				$used_file = $REMOTE_REPO_FILE;
 				$used_file = $REMOTE_REPO_FILE;
 				$contents = file_get_contents($used_file);
 				$contents = file_get_contents($used_file);
-				if(file_put_contents($LOCAL_REPO_FILE, $contents))
-					touch($LOCAL_REPO_FILE);
+				if(strtolower($contents) != "not found"){
+					if(file_put_contents($LOCAL_REPO_FILE, $contents)){
+						touch($LOCAL_REPO_FILE);
+					}
+				}
 			}
 			}
 		}
 		}