* @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 $this->ensureCacheDirectoryExists($path = $this->path($key)); $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($cleared_listing_sql) . '_' . __METHOD__, fn() => array_column( tep_db_query($cleared_listing_sql)->fetch_all(MYSQLI_ASSOC), 'products_id' ) );}/** * get count of comments */ $listing_sql .= " order by p.products_quantity > 0 desc, s.products_id desc"; break; } $listing_sql_raw = $listing_sql; // split query to 2 small queries: 1) find all products ids, 2) get info for each product $pids_price_filter_excluded = tep_get_all_pids_price_exclude($listing_sql, $price_filter_statement); $pids_filter_excluded = tep_get_all_pids_price_exclude($listing_sql, str_replace($price_filter_statement, '', $where_filters)); $pids_filter_excluded = $pids_filter_excluded ?: [0]; $where_attr = !empty($manFilter) ? str_replace($manFilter, '', $where_filters) : $where_filters; $pids_filter_attr_axcluded = tep_get_all_pids_price_exclude($listing_sql, str_replace($price_filter_statement, '', $where_attr));|
ErrorException
|
|---|
ErrorException:
file_put_contents(): Only -1 of 41754 bytes written, possibly out of free disk space
at /mnt/test_sites/sites_new/motofix.com.ua/app/Classes/Filesystem/Filesystem.php:140
at Bootstrap\HandleExceptions->handleError()
(/mnt/test_sites/sites_new/motofix.com.ua/bootstrap/HandleExceptions.php:32)
at Bootstrap\HandleExceptions->Bootstrap\{closure}()
at file_put_contents()
(/mnt/test_sites/sites_new/motofix.com.ua/app/Classes/Filesystem/Filesystem.php:140)
at App\Classes\Filesystem\Filesystem->put()
(/mnt/test_sites/sites_new/motofix.com.ua/app/Classes/Cache/Store/FileStore.php:64)
at App\Classes\Cache\Store\FileStore->put()
(/mnt/test_sites/sites_new/motofix.com.ua/app/Classes/Cache/Repository.php:169)
at App\Classes\Cache\Repository->put()
(/mnt/test_sites/sites_new/motofix.com.ua/app/Classes/Cache/Repository.php:328)
at App\Classes\Cache\Repository->remember()
(/mnt/test_sites/sites_new/motofix.com.ua/app/Classes/Cache/Helpers/FileCacheHelper.php:185)
at App\Classes\Cache\Helpers\FileCacheHelper::remember()
(/mnt/test_sites/sites_new/motofix.com.ua/includes/functions/general.php:102)
at tep_get_all_pids_price_exclude()
(/mnt/test_sites/sites_new/motofix.com.ua/index.php:398)
|