Error Info: Array ( [0] => 42000 [1] => 1064 [2] => You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ';") AND (`category`='app')' at line 1 )
in /var/www/vhosts/deviceranks.com/httpdocs/vendor/yiisoft/yii2/db/Command.php at line 840
$exceptionClass = '\yii\db\Exception'; foreach ($this->exceptionMap as $error => $class) { if (strpos($e->getMessage(), $error) !== false) { $exceptionClass = $class; } } $message = $e->getMessage() . "\nThe SQL being executed was: $rawSql"; $errorInfo = $e instanceof \PDOException ? $e->errorInfo : null; return new $exceptionClass($message, $errorInfo, (int) $e->getCode(), $e); } /** * Returns a value indicating whether a SQL statement is for read purpose. * @param string $sql the SQL statement * @return boolean whether a SQL statement is for read purpose. */ public function isReadQuery($sql) {
$this->pdoStatement->closeCursor(); } Yii::endProfile($token, 'yii\db\Command::query'); } catch (\Exception $e) { Yii::endProfile($token, 'yii\db\Command::query'); throw $this->db->getSchema()->convertException($e, $rawSql); } if (isset($cache, $cacheKey, $info)) { $cache->set($cacheKey, [$result], $info[1], $info[2]); Yii::trace('Saved query result in cache', 'yii\db\Command::query'); }
* @return array|false the first row (in terms of an array) of the query result. False is returned if the query * results in nothing. * @throws Exception execution failed */ public function queryOne($fetchMode = null) { return $this->queryInternal('fetch', $fetchMode); } /** * Executes the SQL statement and returns the value of the first column in the first row of data. * This method is best used when only a single value is needed for a query. * @return string|null|false the value of the first column in the first row of the query result.
* If this parameter is not given, the `db` application component will be used. * @return array|boolean the first row (in terms of an array) of the query result. False is returned if the query * results in nothing. */ public function one($db = null) { return $this->createCommand($db)->queryOne(); } /** * Returns the query result as a scalar value. * The value returned will be the first column in the first row of the query results. * @param Connection $db the database connection used to generate the SQL statement.
* @return ActiveRecord|array|null a single row of query result. Depending on the setting of [[asArray]], * the query result may be either an array or an ActiveRecord object. Null will be returned * if the query results in nothing. */ public function one($db = null) { $row = parent::one($db); if ($row !== false) { $models = $this->populate([$row]); return reset($models) ?: null; } else { return null; }
} if(!empty($event->translatedMessage)){ echo('<<*'.$event->message.'*>>'); $source_message = SourceMessage::find()->where('BINARY message = "'.$event->message.'"')->andWhere(['category' => $event->category])->one(); if(empty($source_message)){ $source_message = new SourceMessage; $source_message->category = $event->category; $source_message->message = $event->message.''; $source_message->save();
$event->sender = $this; } $event->handled = false; $event->name = $name; foreach ($this->_events[$name] as $handler) { $event->data = $handler[1]; call_user_func($handler[0], $event); // stop further handling if the event is handled if ($event->handled) { return; } } }
} elseif ($this->hasEventHandlers(self::EVENT_MISSING_TRANSLATION)) { $event = new MissingTranslationEvent([ 'category' => $category, 'message' => $message, 'language' => $language, ]); $this->trigger(self::EVENT_MISSING_TRANSLATION, $event); if ($event->translatedMessage !== null) { return $this->_messages[$key][$message] = $event->translatedMessage; } } return $this->_messages[$key][$message] = false;
* @param string $language the target language * @return string|boolean the translated message or false if translation wasn't found or isn't required */ public function translate($category, $message, $language) { if ($this->forceTranslation || $language !== $this->sourceLanguage) { return $this->translateMessage($category, $message, $language); } else { return false; } } /**
* @param string $language the language code (e.g. `en-US`, `en`). * @return string the translated and formatted message. */ public function translate($category, $message, $params, $language) { $messageSource = $this->getMessageSource($category); $translation = $messageSource->translate($category, $message, $language); if ($translation === false) { return $this->format($message, $params, $messageSource->sourceLanguage); } else { return $this->format($translation, $params, $language); } }
* [[\yii\base\Application::language|application language]] will be used. * @return string the translated message. */ public static function t($category, $message, $params = [], $language = null) { if (static::$app !== null) { return static::$app->getI18n()->translate($category, $message, $params, $language ?: static::$app->language); } else { $p = []; foreach ((array) $params as $name => $value) { $p['{' . $name . '}'] = $value; }
public function getDisplay_featuresT() { $items_arr = @explode(", ", $this->details_text_14); if(!empty($items_arr)){ foreach($items_arr as $key => $item_details){ $items_arr[$key] = Yii::t('app', $item_details); } $string_items = implode(", ", $items_arr); } return $string_items; }
*/ public function __get($name) { $getter = 'get' . $name; if (method_exists($this, $getter)) { // read property, e.g. getName() return $this->$getter(); } else { // behavior property $this->ensureBehaviors(); foreach ($this->_behaviors as $behavior) { if ($behavior->canGetProperty($name)) { return $behavior->$name;
} elseif ($this->hasAttribute($name)) { return null; } else { if (isset($this->_related[$name]) || array_key_exists($name, $this->_related)) { return $this->_related[$name]; } $value = parent::__get($name); if ($value instanceof ActiveQueryInterface) { return $this->_related[$name] = $value->findFor($name, $this); } else { return $value; } }
if($model->details_number_14) echo('<div class="col-lg-2 col-xs-4">'.$model->getAttributeLabel('display_resolutionT') .' . . . . . . . . . . . . . . . . . . . . . . . . . . </div><div class="col-lg-4 col-xs-8">'.$model->display_resolutionT.'</div>'); if($model->details_number_16) echo('<div class="col-lg-2 col-xs-4">'.$model->getAttributeLabel('display_densityT') .' . . . . . . . . . . . . . . . . . . . . . . . . . . </div><div class="col-lg-4 col-xs-8">'.$model->display_densityT.'</div>'); if($model->details_number_17) echo('<div class="col-lg-2 col-xs-4">'.$model->getAttributeLabel('display_colorT') .' . . . . . . . . . . . . . . . . . . . . . . . . . . </div><div class="col-lg-4 col-xs-8">'.$model->display_colorT.'</div>'); if($model->details_text_14) echo('<div class="col-lg-2 col-xs-4">'.$model->getAttributeLabel('display_featuresT') .' . . . . . . . . . . . . . . . . . . . . . . . . . . </div><div class="col-lg-4 col-xs-8">'.$model->display_featuresT.'</div>'); ?> </div> </div>
*/ public function renderPhpFile($_file_, $_params_ = []) { ob_start(); ob_implicit_flush(false); extract($_params_, EXTR_OVERWRITE); require($_file_); return ob_get_clean(); } /** * Renders dynamic content returned by the given PHP statements.
$this->renderers[$ext] = Yii::createObject($this->renderers[$ext]); } /* @var $renderer ViewRenderer */ $renderer = $this->renderers[$ext]; $output = $renderer->render($this, $viewFile, $params); } else { $output = $this->renderPhpFile($viewFile, $params); } $this->afterRender($viewFile, $params, $output); } array_pop($this->_viewFiles); $this->context = $oldContext;
* @throws InvalidParamException if the view cannot be resolved or the view file does not exist. * @see renderFile() */ public function render($view, $params = [], $context = null) { $viewFile = $this->findViewFile($view, $context); return $this->renderFile($viewFile, $params, $context); } /** * Finds the view file based on the given view name. * @param string $view the view name or the path alias of the view file. Please refer to [[render()]] * on how to specify this parameter.
* These parameters will not be available in the layout. * @return string the rendering result. * @throws InvalidParamException if the view file or the layout file does not exist. */ public function render($view, $params = []) { $content = $this->getView()->render($view, $params, $this); return $this->renderContent($content); } /** * Renders a static string by applying a layout. * @param string $content the static string being rendered
return $this->render('viewnew', [ 'model' => $model, 'model_post' => $model_post, 'model_comment' => $model_comment, 'arr_bands' => $arr_bands, 'carrier' => $carrier, ]); }
$args = $this->controller->bindActionParams($this, $params); Yii::trace('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()', __METHOD__); if (Yii::$app->requestedParams === null) { Yii::$app->requestedParams = $args; } return call_user_func_array([$this->controller, $this->actionMethod], $args); } }
} $result = null; if ($runAction && $this->beforeAction($action)) { // run the action $result = $action->runWithParams($params); $result = $this->afterAction($action, $result); // call afterAction on modules foreach ($modules as $module) { /* @var $module Module */
$parts = $this->createController($route); if (is_array($parts)) { /* @var $controller Controller */ list($controller, $actionID) = $parts; $oldController = Yii::$app->controller; Yii::$app->controller = $controller; $result = $controller->runAction($actionID, $params); Yii::$app->controller = $oldController; return $result; } else { $id = $this->getUniqueId(); throw new InvalidRouteException('Unable to resolve the request "' . ($id === '' ? $route : $id . '/' . $route) . '".');
$params = $this->catchAll; unset($params[0]); } try { Yii::trace("Route requested: '$route'", __METHOD__); $this->requestedRoute = $route; $result = $this->runAction($route, $params); if ($result instanceof Response) { return $result; } else { $response = $this->getResponse(); if ($result !== null) { $response->data = $result;
try { $this->state = self::STATE_BEFORE_REQUEST; $this->trigger(self::EVENT_BEFORE_REQUEST); $this->state = self::STATE_HANDLING_REQUEST; $response = $this->handleRequest($this->getRequest()); $this->state = self::STATE_AFTER_REQUEST; $this->trigger(self::EVENT_AFTER_REQUEST); $this->state = self::STATE_SENDING_RESPONSE; $response->send();
$config = yii\helpers\ArrayHelper::merge( require(__DIR__ . '/../../common/config/main.php'), require(__DIR__ . '/../config/main.php') ); $application = new yii\web\Application($config); $application->run();
$_GET = [ 'id' => '16896', 'seo' => 'buy-samsung-galaxy-z-fold2-price', ]; $_SESSION = [ '__flash' => [], '__returnUrl' => '/el/phone/16896/buy-samsung-galaxy-z-fold2-price', ];