* @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); //save list of keys to paths if ($key !== 'ALL_KEYS' && empty($seconds)) { $allKeys = $this->get('ALL_KEYS') ?: []; if (!isset($allKeys[$key])) { $allKeys[$key] = 1; $this->put('ALL_KEYS', $allKeys, 0); } } $result = $this->files->put( $path, * @param mixed $value * @return bool */ public function forever($key, $value): bool { return $this->put($key, $value, 0); } /** * Remove an item from the cache. * @param string $key * @param mixed $value * @return bool */ public function forever($key, $value) { $result = $this->store->forever($this->itemKey($key), $value); if ($result) { event(new CacheWritten($key, $value)); } if (is_array($key)) { return $this->putMany($key, $value); } if ($ttl === null) { return $this->forever($key, $value); } $seconds = $this->getSeconds($ttl); if ($seconds <= 0) { // 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; } /** public static function remember(string $key, \Closure $closure, $ttl = 60 * 5) { try { return self::getRepository() ->remember( $key, $ttl, $closure ); } catch (\Exception $exception) { Log::critical($exception->getMessage(), [ while ($raw_listing = tep_db_fetch_array($module_products_first)) { $all_pids[] = $raw_listing['products_id']; } return $all_pids; }, null ); } return $all_pids;}}function tep_get_all_pids_price_exclude($listing_sql, $excluded_statement){ $cleared_listing_sql = str_replace($excluded_statement, '', $listing_sql); return tep_get_all_pids($cleared_listing_sql);}/** * get count of comments */ $listing_sql .= " limit 0, " . $lastProductNumberForPagination; $listing_sql_raw = $listing_sql; // debug($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 = str_replace($manFilter, '', $where_filters); |
ErrorException
|
|---|
ErrorException:
file_put_contents(): Only -1 of 73 bytes written, possibly out of free disk space
at /home/dev_ltscreen/web/dev.ltscreen.com/public_html/app/Classes/Filesystem/Filesystem.php:140
at Bootstrap\HandleExceptions->handleError()
(/home/dev_ltscreen/web/dev.ltscreen.com/public_html/bootstrap/HandleExceptions.php:32)
at Bootstrap\HandleExceptions->Bootstrap\{closure}()
at file_put_contents()
(/home/dev_ltscreen/web/dev.ltscreen.com/public_html/app/Classes/Filesystem/Filesystem.php:140)
at App\Classes\Filesystem\Filesystem->put()
(/home/dev_ltscreen/web/dev.ltscreen.com/public_html/app/Classes/Cache/Store/FileStore.php:71)
at App\Classes\Cache\Store\FileStore->put()
(/home/dev_ltscreen/web/dev.ltscreen.com/public_html/app/Classes/Cache/Store/FileStore.php:64)
at App\Classes\Cache\Store\FileStore->put()
(/home/dev_ltscreen/web/dev.ltscreen.com/public_html/app/Classes/Cache/Store/FileStore.php:138)
at App\Classes\Cache\Store\FileStore->forever()
(/home/dev_ltscreen/web/dev.ltscreen.com/public_html/app/Classes/Cache/Repository.php:301)
at App\Classes\Cache\Repository->forever()
(/home/dev_ltscreen/web/dev.ltscreen.com/public_html/app/Classes/Cache/Repository.php:160)
at App\Classes\Cache\Repository->put()
(/home/dev_ltscreen/web/dev.ltscreen.com/public_html/app/Classes/Cache/Repository.php:328)
at App\Classes\Cache\Repository->remember()
(/home/dev_ltscreen/web/dev.ltscreen.com/public_html/app/Classes/Cache/Helpers/FileCacheHelper.php:282)
at App\Classes\Cache\Helpers\FileCacheHelper::remember()
(/home/dev_ltscreen/web/dev.ltscreen.com/public_html/includes/functions/general.php:120)
at tep_get_all_pids()
(/home/dev_ltscreen/web/dev.ltscreen.com/public_html/includes/functions/general.php:129)
at tep_get_all_pids_price_exclude()
(/home/dev_ltscreen/web/dev.ltscreen.com/public_html/index.php:320)
|