CDbException

CDbCommand не удалось исполнить SQL-запрос: SQLSTATE[HY000]: General error: 1615 Prepared statement needs to be re-prepared. The SQL statement executed was: SELECT * FROM `tbl_settings` `t` WHERE `t`.`category`=:yp0 AND `t`.`name`=:yp1 LIMIT 1. Bound with :yp0='module#form', :yp1='use_recaptcha'

/hosting/disk1/h30483334/web/ocprof.ru/www/Yii/db/CDbCommand.php(543)

531         {
532             if($this->_connection->enableProfiling)
533                 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
534 
535             $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
536             $message=$e->getMessage();
537             Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.',
538                 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
539 
540             if(YII_DEBUG)
541                 $message.='. The SQL statement executed was: '.$this->getText().$par;
542 
543             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
544                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
545         }
546     }
547 
548     /**
549      * Builds a SQL SELECT statement from the given query specification.
550      * @param array $query the query specification in name-value pairs. The following
551      * query options are supported: {@link select}, {@link distinct}, {@link from},
552      * {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
553      * {@link limit}, {@link offset} and {@link union}.
554      * @throws CDbException if "from" key is not present in given query parameter
555      * @return string the SQL statement

Stack Trace

#3
+
 /hosting/disk1/h30483334/web/ocprof.ru/www/protected/modules/itexcms/models/tables/Settings.php(118): CActiveRecord->findByAttributes(array("category" => "module#form", "name" => "use_recaptcha"))
113         $item = self::model()->findByAttributes(
114             array(
115                 'category' => $category,
116                 'name' => $name,
117             )
118         );
119         if (empty($item))
120             return $defaultValue;
121         else
122             return $item->value;
123     }
#4
+
 /hosting/disk1/h30483334/web/ocprof.ru/www/protected/helpers/CmsHelper.php(73): Settings::get("module#form", "use_recaptcha", null)
68         if (!isset(self::$settingsCache[$category])) {
69             self::$settingsCache[$category] = [];
70         }
71 
72         if (!isset(self::$settingsCache[$category][$name])) {
73             self::$settingsCache[$category][$name] = Settings::get($category, $name, $defaultValue);
74         }
75 
76         return self::$settingsCache[$category][$name];
77     }
78 
#5
+
 /hosting/disk1/h30483334/web/ocprof.ru/www/protected/components/IndividualSite.php(20): CmsHelper::settings("module#form", "use_recaptcha")
15         $controller = Yii::app()->controller;
16         if (!($controller instanceof ItexCmsController) && $controller->action->id !== 'modal') {
17             Yii::app()->clientScript->registerCoreScript('jquery');
18             Yii::app()->clientScript->registerCoreScript('maskedinput');
19 
20             if (CmsHelper::settings('module#form', 'use_recaptcha')) {
21                 Yii::app()->clientScript->registerScriptFile(
22                     'https://www.google.com/recaptcha/api.js',
23                     CClientScript::POS_HEAD
24                 );
25             } else {
2024-03-29 04:18:17 Apache/2.4.10 (Debian) Yii Framework/1.1.15