Zwiększenie poziomu raportowania błędów w product.php oraz poprawa formatowania kodu w cron.php
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
error_reporting( E_ALL ^ E_NOTICE ^ E_STRICT ^ E_WARNING ^ E_DEPRECATED );
|
||||||
$ROOT_DIR = $_SERVER['DOCUMENT_ROOT'];
|
$ROOT_DIR = $_SERVER['DOCUMENT_ROOT'];
|
||||||
|
|
||||||
require_once $ROOT_DIR . '/config.php';
|
require_once $ROOT_DIR . '/config.php';
|
||||||
|
|||||||
6
cron.php
6
cron.php
@@ -83,7 +83,8 @@ function parseOrlenAddress( $input )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getImageUrlById($id) {
|
function getImageUrlById ($id )
|
||||||
|
{
|
||||||
$apiUrl = $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['SERVER_NAME'] . '/api/v1/product.php';
|
$apiUrl = $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['SERVER_NAME'] . '/api/v1/product.php';
|
||||||
|
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
@@ -95,7 +96,8 @@ function getImageUrlById($id) {
|
|||||||
));
|
));
|
||||||
|
|
||||||
$response = curl_exec($ch);
|
$response = curl_exec($ch);
|
||||||
if ($response === false) {
|
if ( $response === false )
|
||||||
|
{
|
||||||
curl_close($ch);
|
curl_close($ch);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user