* @param bool $lock
* @return int
*/
public function put(string $path, $contents, $lock = false)
{
return file_put_contents($path, $contents, $lock ? LOCK_EX : 0);
}
/**
* Write the contents of a file, replacing it atomically if it already exists.
* @param string $path
//ini_set('error_log' , '/home/solomono/web/solomono.net/sites/dev/php.log');
error_reporting(E_ALL);
set_error_handler(function ($level, $message, $file = '', $line = 0) {
$this->handleError($level, $message, $file, $line);
});
set_exception_handler(function ($e) {
$this->handleException($e);
});
* @param bool $lock
* @return int
*/
public function put(string $path, $contents, $lock = false)
{
return file_put_contents($path, $contents, $lock ? LOCK_EX : 0);
}
/**
* Write the contents of a file, replacing it atomically if it already exists.
* @param string $path
}
$result = $this->files->put(
$path,
$this->expiration($seconds) . serialize($value),
true
);
if ($result !== false && $result > 0) {
$this->ensureFileHasCorrectPermissions($path);
if ($seconds <= 0) {
return $this->forget($key);
}
$result = $this->store->put($this->itemKey($key), $value, $seconds);
if ($result) {
event(new CacheWritten($key, $value, $seconds));
}
// given number of seconds so it's available for all subsequent requests.
if (!is_null($value)) {
return $value;
}
$this->put($key, $value = $callback(), $ttl);
return $value;
}
/**
try {
if ($isCacheEnabled) {
return self::getRepository()
->remember(
$key,
$ttl,
$closure
);
} else {
return $closure();
md5($listing_sql) . '_' . __METHOD__,
fn() => array_column(
tep_db_query($listing_sql)->fetch_all(MYSQLI_ASSOC),
'products_id'
),
60 * 60
);
}
function tep_get_all_pids_price_exclude($listing_sql, $excluded_statement)
{
function tep_get_all_pids_price_exclude($listing_sql, $excluded_statement)
{
$cleared_listing_sql = str_replace($excluded_statement, '', $listing_sql);
return tep_get_all_sql_products_ids($cleared_listing_sql);
}
function tep_get_query_products_info($listing_sql, $limit = 10)
{
global $languages_id, $customer_price, $listing_add_fields, $spec_array, $all_pids;
$listing_sql_raw = $listing_sql;
// split query to 2 small queries: 1) find all products ids, 2) get info for each product
//products ids for filters
$pids_price_filter_excluded = tep_get_all_pids_price_exclude($listing_sql, $price_filter_statement);
//products ids for filters
$pids_filter_excluded = tep_get_all_pids_price_exclude($listing_sql, str_replace($price_filter_statement, '', $where_filters)) ?: [0];
//products ids for attributes
ErrorException
|
---|
ErrorException: file_put_contents(): Only 4096 of 25112 bytes written, possibly out of free disk space at /home/solomono/web/solomono.net/sites/demo/app/Classes/Filesystem/Filesystem.php:140 at Bootstrap\HandleExceptions->handleError() (/home/solomono/web/solomono.net/sites/demo/bootstrap/HandleExceptions.php:32) at Bootstrap\HandleExceptions->Bootstrap\{closure}() at file_put_contents() (/home/solomono/web/solomono.net/sites/demo/app/Classes/Filesystem/Filesystem.php:140) at App\Classes\Filesystem\Filesystem->put() (/home/solomono/web/solomono.net/sites/demo/app/Classes/Cache/Store/FileStore.php:71) at App\Classes\Cache\Store\FileStore->put() (/home/solomono/web/solomono.net/sites/demo/app/Classes/Cache/Repository.php:169) at App\Classes\Cache\Repository->put() (/home/solomono/web/solomono.net/sites/demo/app/Classes/Cache/Repository.php:328) at App\Classes\Cache\Repository->remember() (/home/solomono/web/solomono.net/sites/demo/app/Classes/Cache/Helpers/FileCacheHelper.php:161) at App\Classes\Cache\Helpers\FileCacheHelper::remember() (/home/solomono/web/solomono.net/sites/demo/includes/functions/general.php:42) at tep_get_all_sql_products_ids() (/home/solomono/web/solomono.net/sites/demo/includes/functions/general.php:50) at tep_get_all_pids_price_exclude() (/mnt/test_sites/sites_new/bnz.com.ua/index.php:339) |