Exception

Unknown Propertyyii\base\UnknownPropertyException

Getting unknown property: common\models\User::legal_mobile

  • 1. in /yandata/www/vendor/yiisoft/yii2/base/Component.php at line 143
    134135136137138139140141142143144145146147148149150151152
                foreach ($this->_behaviors as $behavior) {
                    if ($behavior->canGetProperty($name)) {
                        return $behavior->$name;
                    }
                }
            }
            if (method_exists($this, 'set' . $name)) {
                throw new InvalidCallException('Getting write-only property: ' . get_class($this) . '::' . $name);
            } else {
                throw new UnknownPropertyException('Getting unknown property: ' . get_class($this) . '::' . $name);
            }
        }
     
        /**
         * Sets the value of a component property.
         * This method will check in the following order and act accordingly:
         *
         *  - a property defined by a setter: set the property value
         *  - an event in the format of "on xyz": attach the handler to the event "xyz"
    
  • 2. in /yandata/www/vendor/yiisoft/yii2/db/BaseActiveRecord.php at line 247 yii\base\Component::__get('legal_mobile')
    241242243244245246247248249250251252253
            } 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;
                }
            }
    
  • 3. in /yandata/www/vendor/yiisoft/yii2/helpers/BaseHtml.php at line 2060 yii\db\BaseActiveRecord::__get('legal_mobile')
    2054205520562057205820592060206120622063206420652066
        public static function getAttributeValue($model, $attribute)
        {
            if (!preg_match('/(^|.*\])([\w\.]+)(\[.*|$)/', $attribute, $matches)) {
                throw new InvalidParamException('Attribute name must contain word characters only.');
            }
            $attribute = $matches[2];
            $value = $model->$attribute;
            if ($matches[3] !== '') {
                foreach (explode('][', trim($matches[3], '[]')) as $id) {
                    if ((is_array($value) || $value instanceof \ArrayAccess) && isset($value[$id])) {
                        $value = $value[$id];
                    } else {
                        return null;
    
  • 4. in /yandata/www/vendor/yiisoft/yii2/helpers/BaseHtml.php at line 1235 yii\helpers\BaseHtml::getAttributeValue(common\models\User, 'legal_mobile')
    1229123012311232123312341235123612371238123912401241
         * See [[renderTagAttributes()]] for details on how attributes are being rendered.
         * @return string the generated input tag
         */
        public static function activeInput($type, $model, $attribute, $options = [])
        {
            $name = isset($options['name']) ? $options['name'] : static::getInputName($model, $attribute);
            $value = isset($options['value']) ? $options['value'] : static::getAttributeValue($model, $attribute);
            if (!array_key_exists('id', $options)) {
                $options['id'] = static::getInputId($model, $attribute);
            }
            return static::input($type, $name, $value, $options);
        }
     
    
  • 5. in /yandata/www/vendor/yiisoft/yii2/helpers/BaseHtml.php at line 1284 yii\helpers\BaseHtml::activeInput('text', common\models\User, 'legal_mobile', ['class' => 'form-control', 'placeholder' => '请输入法人的手机号码'])
    1278127912801281128212831284128512861287128812891290
         *
         * @return string the generated input tag
         */
        public static function activeTextInput($model, $attribute, $options = [])
        {
            self::normalizeMaxLength($model, $attribute, $options);
            return static::activeInput('text', $model, $attribute, $options);
        }
     
        /**
         * Generates a hidden input tag for the given model attribute.
         * This method will generate the "name" and "value" tag attributes automatically for the model attribute
         * unless they are explicitly specified in `$options`.
    
  • 6. in /yandata/www/vendor/yiisoft/yii2/widgets/ActiveField.php at line 365 yii\helpers\BaseHtml::activeTextInput(common\models\User, 'legal_mobile', ['class' => 'form-control', 'placeholder' => '请输入法人的手机号码'])
    359360361362363364365366367368369370371
         * @return $this the field object itself
         */
        public function textInput($options = [])
        {
            $options = array_merge($this->inputOptions, $options);
            $this->adjustLabelFor($options);
            $this->parts['{input}'] = Html::activeTextInput($this->model, $this->attribute, $options);
     
            return $this;
        }
     
        /**
         * Renders a hidden input.
    
  • 7. in /yandata/www/zxah/frontend/modules/auth/views/register/index.php at line 26 yii\widgets\ActiveField::textInput(['placeholder' => '请输入法人的手机号码'])
    20212223242526272829303132
                        ]
                    ])?>
     
                    <?=$form->field($model,'company')->textInput(['placeholder'=>'请输入单位名称'])?>
                    <?=$form->field($model,'unified_code')->textInput(['placeholder'=>'请输入统一社会信用码'])?>
                    <?=$form->field($model,'legal')->textInput(['placeholder'=>'请输入法定代表人姓名'])?>
                    <?=$form->field($model,'legal_mobile')->textInput(['placeholder'=>'请输入法人的手机号码'])?>
                    <?=$form->field($model,'certificate_type')->dropDownList(\common\models\User::$certificate_type)?>
                    <?=$form->field($model,'certificate_no')->textInput(['placeholder'=>'请输入法定代表人证件号码'])?>
                    <h4>账号信息</h4>
                    <?=$form->field($model,'mobile')->textInput(['placeholder'=>'请输入手机号'])?>
                    <?=$form->field($model,'password')->passwordInput(['placeholder'=>'密码需由6-16个字母、数字或符号组成,区分大小写;不建议使用重复、连续的字母、数字或符号'])?>
                    <?=$form->field($model,'re_password')->passwordInput(['placeholder'=>'两次密码必须一致'])?>
    
  • 8. in /yandata/www/vendor/yiisoft/yii2/base/View.php at line 325 – require('/yandata/www/zxah/frontend/modul...')
    319320321322323324325326327328329330331
         */
        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.
    
  • 9. in /yandata/www/vendor/yiisoft/yii2/base/View.php at line 249 yii\base\View::renderPhpFile('/yandata/www/zxah/frontend/modul...', ['model' => common\models\User])
    243244245246247248249250251252253254255
                        $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;
            return $output;
    
  • 10. in /yandata/www/vendor/yiisoft/yii2/base/View.php at line 150 yii\base\View::renderFile('/yandata/www/zxah/frontend/modul...', ['model' => common\models\User], frontend\modules\auth\controllers\RegisterController)
    144145146147148149150151152153154155156
         * @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.
    
  • 11. in /yandata/www/vendor/yiisoft/yii2/base/Controller.php at line 378 yii\base\View::render('index', ['model' => common\models\User], frontend\modules\auth\controllers\RegisterController)
    372373374375376377378379380381382383384
         * 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
    
  • 12. in /yandata/www/zxah/frontend/modules/auth/controllers/RegisterController.php at line 63 yii\base\Controller::render('index', ['model' => common\models\User])
    57585960616263646566676869
                    ]);
                }
     
            } else {
                return $this->render('index', [
                    'model' => $model,
                ]);
            }
     
     
        }
        function generateSign($secret,$params){
            ksort($params);
    
  • 13. frontend\modules\auth\controllers\RegisterController::actionIndex()
  • 14. in /yandata/www/vendor/yiisoft/yii2/base/InlineAction.php at line 54 – call_user_func_array([frontend\modules\auth\controllers\RegisterController, 'actionIndex'], [])
    484950515253545556
        {
            $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);
        }
    }
    
  • 15. in /yandata/www/vendor/yiisoft/yii2/base/Controller.php at line 155 yii\base\InlineAction::runWithParams([])
    149150151152153154155156157158159160161
     
            $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 */
    
  • 16. in /yandata/www/vendor/yiisoft/yii2/base/Module.php at line 454 yii\base\Controller::runAction('', [])
    448449450451452453454455456457458459460
            $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) . '".');
    
  • 17. in /yandata/www/vendor/yiisoft/yii2/web/Application.php at line 85 yii\base\Module::runAction('auth/register', [])
    79808182838485868788899091
                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) {
    
  • 18. in /yandata/www/vendor/yiisoft/yii2/base/Application.php at line 375 yii\web\Application::handleRequest(yii\web\Request)
    369370371372373374375376377378379380381
            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();
    
  • 19. in /yandata/www/zxah/index.php at line 32 yii\base\Application::run()
    26272829303132
        require(__DIR__ . '/frontend/config/main-local.php'),
        require(__DIR__ . '/frontend/config/modules.php')
    );
     
    $application = new yii\web\Application($config);
     
    $application->run();
    
  •