linccce

yii-user restore error

Jun 10th, 2014
570
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.25 KB | None | 0 0
  1. PHP warning
  2.  
  3. preg_match(): Compilation failed: invalid range in character class at offset 15
  4.  
  5. C:\wamp\www\yii\framework\validators\CRegularExpressionValidator.php(53)
  6.  
  7. 41 * @param string $attribute the attribute being validated
  8. 42 * @throws CException if given {@link pattern} is empty
  9. 43 */
  10. 44 protected function validateAttribute($object,$attribute)
  11. 45 {
  12. 46 $value=$object->$attribute;
  13. 47 if($this->allowEmpty && $this->isEmpty($value))
  14. 48 return;
  15. 49 if($this->pattern===null)
  16. 50 throw new CException(Yii::t('yii','The "pattern" property must be specified with a valid regular expression.'));
  17. 51 // reason of array checking explained here: https://github.com/yiisoft/yii/issues/1955
  18. 52 if(is_array($value) ||
  19. 53 (!$this->not && !preg_match($this->pattern,$value)) ||
  20. 54 ($this->not && preg_match($this->pattern,$value)))
  21. 55 {
  22. 56 $message=$this->message!==null?$this->message:Yii::t('yii','{attribute} is invalid.');
  23. 57 $this->addError($object,$attribute,$message);
  24. 58 }
  25. 59 }
  26. 60
  27. 61 /**
  28. 62 * Returns the JavaScript needed for performing client-side validation.
  29. 63 * @param CModel $object the data object being validated
  30. 64 * @param string $attribute the name of the attribute to be validated.
  31. 65 * @throws CException if given {@link pattern} is empty
  32. Stack Trace
  33. #0
  34. – C:\wamp\www\yii\framework\validators\CRegularExpressionValidator.php(53): preg_match("/^[[email protected]\s,]+$/u", "[email protected]")
  35. 48 return;
  36. 49 if($this->pattern===null)
  37. 50 throw new CException(Yii::t('yii','The "pattern" property must be specified with a valid regular expression.'));
  38. 51 // reason of array checking explained here: https://github.com/yiisoft/yii/issues/1955
  39. 52 if(is_array($value) ||
  40. 53 (!$this->not && !preg_match($this->pattern,$value)) ||
  41. 54 ($this->not && preg_match($this->pattern,$value)))
  42. 55 {
  43. 56 $message=$this->message!==null?$this->message:Yii::t('yii','{attribute} is invalid.');
  44. 57 $this->addError($object,$attribute,$message);
  45. 58 }
  46. #1
  47. – C:\wamp\www\yii\framework\validators\CValidator.php(213): CRegularExpressionValidator->validateAttribute(UserRecoveryForm, "login_or_email")
  48. 208 else
  49. 209 $attributes=$this->attributes;
  50. 210 foreach($attributes as $attribute)
  51. 211 {
  52. 212 if(!$this->skipOnError || !$object->hasErrors($attribute))
  53. 213 $this->validateAttribute($object,$attribute);
  54. 214 }
  55. 215 }
  56. 216
  57. 217 /**
  58. 218 * Returns the JavaScript needed for performing client-side validation.
  59. #2
  60. – C:\wamp\www\yii\framework\base\CModel.php(159): CValidator->validate(UserRecoveryForm, null)
  61. 154 if($clearErrors)
  62. 155 $this->clearErrors();
  63. 156 if($this->beforeValidate())
  64. 157 {
  65. 158 foreach($this->getValidators() as $validator)
  66. 159 $validator->validate($this,$attributes);
  67. 160 $this->afterValidate();
  68. 161 return !$this->hasErrors();
  69. 162 }
  70. 163 else
  71. 164 return false;
  72. #3
  73. – C:\wamp\www\sventesvek\protected\modules\user\controllers\RecoveryController.php(42): CModel->validate()
  74. 37 $this->redirect(Yii::app()->controller->module->recoveryUrl);
  75. 38 }
  76. 39 } else {
  77. 40 if(isset($_POST['UserRecoveryForm'])) {
  78. 41 $form->attributes=$_POST['UserRecoveryForm'];
  79. 42 if($form->validate()) {
  80. 43 $user = User::model()->notsafe()->findbyPk($form->user_id);
  81. 44 $activation_url = 'http://' . $_SERVER['HTTP_HOST'].$this->createUrl(implode(Yii::app()->controller->module->recoveryUrl),array("activkey" => $user->activkey, "email" => $user->email));
  82. 45
  83. 46 $subject = UserModule::t("You have requested the password recovery site {site_name}",
  84. 47 array(
  85. #4
  86. – C:\wamp\www\yii\framework\web\actions\CInlineAction.php(49): RecoveryController->actionRecovery()
  87. 44 $controller=$this->getController();
  88. 45 $method=new ReflectionMethod($controller, $methodName);
  89. 46 if($method->getNumberOfParameters()>0)
  90. 47 return $this->runWithParamsInternal($controller, $method, $params);
  91. 48 else
  92. 49 return $controller->$methodName();
  93. 50 }
  94. 51
  95. 52 }
  96. #5
  97. – C:\wamp\www\yii\framework\web\CController.php(308): CInlineAction->runWithParams(array("r" => "user/recovery"))
  98. 303 {
  99. 304 $priorAction=$this->_action;
  100. 305 $this->_action=$action;
  101. 306 if($this->beforeAction($action))
  102. 307 {
  103. 308 if($action->runWithParams($this->getActionParams())===false)
  104. 309 $this->invalidActionParams($action);
  105. 310 else
  106. 311 $this->afterAction($action);
  107. 312 }
  108. 313 $this->_action=$priorAction;
  109. #6
  110. – C:\wamp\www\yii\framework\web\CController.php(286): CController->runAction(CInlineAction)
  111. 281 * @see runAction
  112. 282 */
  113. 283 public function runActionWithFilters($action,$filters)
  114. 284 {
  115. 285 if(empty($filters))
  116. 286 $this->runAction($action);
  117. 287 else
  118. 288 {
  119. 289 $priorAction=$this->_action;
  120. 290 $this->_action=$action;
  121. 291 CFilterChain::create($this,$action,$filters)->run();
  122. #7
  123. – C:\wamp\www\yii\framework\web\CController.php(265): CController->runActionWithFilters(CInlineAction, array())
  124. 260 {
  125. 261 if(($parent=$this->getModule())===null)
  126. 262 $parent=Yii::app();
  127. 263 if($parent->beforeControllerAction($this,$action))
  128. 264 {
  129. 265 $this->runActionWithFilters($action,$this->filters());
  130. 266 $parent->afterControllerAction($this,$action);
  131. 267 }
  132. 268 }
  133. 269 else
  134. 270 $this->missingAction($actionID);
  135. #8
  136. – C:\wamp\www\yii\framework\web\CWebApplication.php(282): CController->run("")
  137. 277 {
  138. 278 list($controller,$actionID)=$ca;
  139. 279 $oldController=$this->_controller;
  140. 280 $this->_controller=$controller;
  141. 281 $controller->init();
  142. 282 $controller->run($actionID);
  143. 283 $this->_controller=$oldController;
  144. 284 }
  145. 285 else
  146. 286 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".',
  147. 287 array('{route}'=>$route===''?$this->defaultController:$route)));
  148. #9
  149. – C:\wamp\www\yii\framework\web\CWebApplication.php(141): CWebApplication->runController("user/recovery")
  150. 136 foreach(array_splice($this->catchAllRequest,1) as $name=>$value)
  151. 137 $_GET[$name]=$value;
  152. 138 }
  153. 139 else
  154. 140 $route=$this->getUrlManager()->parseUrl($this->getRequest());
  155. 141 $this->runController($route);
  156. 142 }
  157. 143
  158. 144 /**
  159. 145 * Registers the core application components.
  160. 146 * This method overrides the parent implementation by registering additional core components.
  161. #10
  162. – C:\wamp\www\yii\framework\base\CApplication.php(180): CWebApplication->processRequest()
  163. 175 public function run()
  164. 176 {
  165. 177 if($this->hasEventHandler('onBeginRequest'))
  166. 178 $this->onBeginRequest(new CEvent($this));
  167. 179 register_shutdown_function(array($this,'end'),0,false);
  168. 180 $this->processRequest();
  169. 181 if($this->hasEventHandler('onEndRequest'))
  170. 182 $this->onEndRequest(new CEvent($this));
  171. 183 }
  172. 184
  173. 185 /**
  174. #11
  175. – C:\wamp\www\sventesvek\index.php(13): CApplication->run()
  176. 08 defined('YII_DEBUG') or define('YII_DEBUG',true);
  177. 09 // specify how many levels of call stack should be shown in each log message
  178. 10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
  179. 11
  180. 12 require_once($yii);
  181. 13 Yii::createWebApplication($config)->run();
  182. 2014-06-10 11:46:42 Apache/2.4.9 (Win64) PHP/5.5.12 Yii Framework/1.1.14
Advertisement
Add Comment
Please, Sign In to add comment