Unknown Property – yii\base\UnknownPropertyException
Setting unknown property: fecyo\app\apphtml5\modules\Checkout\block\onepage\Addressedit::_address_id
in /www/wwwroot/fecyo.openadc.top/vendor/yiisoft/yii2/base/BaseObject.phpat line 164
public function __set($name, $value)
{
$setter = 'set' . $name;
//var_dump($setter);die;
if (method_exists($this, $setter)) {
$this->$setter($value);
} elseif (method_exists($this, 'get' . $name)) {
throw new InvalidCallException('Setting read-only property: ' . get_class($this) . '::' . $name);
} else {
throw new UnknownPropertyException('Setting unknown property: ' . get_class($this) . '::' . $name);
}
}
in /www/wwwroot/fecyo.openadc.top/addons/fecmall/fecyo/app/apphtml5/modules/Checkout/block/onepage/Addressedit.php at line 25– yii\base\BaseObject::__set('_address_id', '2')
{
protected $_address;
public function initAddress()
{
//$address = Yii::$app->request->post('editForm');
$this->_address_id = Yii::$app->request->get('address_id');
if (!$this->_address_id) return;
$addressModel = Yii::$service->customer->address->getByPrimaryKey($this->_address_id);
$identity = Yii::$app->user->identity;
$customer_id = $identity['id'];
if ($addressModel['address_id']) {
// 该id必须是当前用户的
in /www/wwwroot/fecyo.openadc.top/addons/fecmall/fecyo/app/apphtml5/modules/Checkout/block/onepage/Addressedit.php at line 42– fecyo\app\apphtml5\modules\Checkout\block\onepage\Addressedit::initAddress()
public function getLastData()
{
$this->initAddress();
if (empty($this->_address)) {
$this->_address = [];
}
return [
'address' => $this->_address,
in /www/wwwroot/fecyo.openadc.top/addons/fecmall/fecyo/app/apphtml5/modules/Checkout/controllers/OnepageController.php at line 113– fecyo\app\apphtml5\modules\Checkout\block\onepage\Addressedit::getLastData()
}
if ($this->getBlock()->save($address)) {
return Yii::$service->url->redirectByUrlKey('checkout/onepage/address');
}
}
$data = $this->getBlock()->getLastData();
return $this->render($this->action->id, $data);
}
// 地址删除
public function actionAddressremove()
{
fecyo\app\apphtml5\modules\Checkout\controllers\OnepageController::actionAddressedit()
in /www/wwwroot/fecyo.openadc.top/vendor/yiisoft/yii2/base/InlineAction.php at line 57– call_user_func_array([fecyo\app\apphtml5\modules\Checkout\controllers\OnepageController, 'actionAddressedit'], [])
$args = $this->controller->bindActionParams($this, $params);
Yii::debug('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);
}
}
in /www/wwwroot/fecyo.openadc.top/vendor/yiisoft/yii2/base/Controller.php at line 181– yii\base\InlineAction::runWithParams(['address_id' => '2'])
}
$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 */
in /www/wwwroot/fecyo.openadc.top/vendor/yiisoft/yii2/base/Module.php at line 534– yii\base\Controller::runAction('addressedit', ['address_id' => '2'])
$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);
if ($oldController !== null) {
Yii::$app->controller = $oldController;
}
return $result;
}
in /www/wwwroot/fecyo.openadc.top/vendor/yiisoft/yii2/web/Application.php at line 104– yii\base\Module::runAction('checkout/onepage/addressedit', ['address_id' => '2'])
$params = $this->catchAll;
unset($params[0]);
}
try {
Yii::debug("Route requested: '$route'", __METHOD__);
$this->requestedRoute = $route;
$result = $this->runAction($route, $params);
if ($result instanceof Response) {
return $result;
}
$response = $this->getResponse();
if ($result !== null) {
in /www/wwwroot/fecyo.openadc.top/vendor/yiisoft/yii2/base/Application.php at line 392– yii\web\Application::handleRequest(fecshop\yii\web\Request)
{
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();
- in /www/wwwroot/fecyo.openadc.top/apphtml5/web/index.php at line 64– yii\base\Application::run()
* 使用方法:Yii::$service->cms->article;
* 上面的例子就是获取cms服务的子服务article。
*/
new fecshop\services\Application($config);
$application = new yii\web\Application($config);
$application->run();