Yesterday i’v updated yii and today get an exception “substr_compare(): The length must be greater than zero”.
I’v found two issues on github /yiisoft/yii2/issues/4526 and /yiisoft/yii/issues/3469.
Exception page is attached.
ty
Yesterday i’v updated yii and today get an exception “substr_compare(): The length must be greater than zero”.
I’v found two issues on github /yiisoft/yii2/issues/4526 and /yiisoft/yii/issues/3469.
Exception page is attached.
ty
Update once again. I’ve fixed it.
Ty but there is another ‘bug’ with generated labels
public function attributeLabels()
{
return [
'id' => Yii::t('common/shop', 'ID'),
'partner_id' => Yii::t('common/shop', 'Partner Id'),
'name' => Yii::t('common/shop', 'N ID'),
'code' => Yii::t('common/shop', 'C ID'),
'lon' => Yii::t('common/shop', ' ID'),
'lat' => Yii::t('common/shop', ' ID'),
'country_id' => Yii::t('common/shop', 'Country Id'),
'region_id' => Yii::t('common/shop', 'Region Id'),
'city_id' => Yii::t('common/shop', 'City Id'),
'address' => Yii::t('common/shop', 'Addr ID'),
'mall_name' => Yii::t('common/shop', 'Mall N ID'),
'description' => Yii::t('common/shop', 'Descript ID'),
'logo' => Yii::t('common/shop', 'L ID'),
'is_active' => Yii::t('common/shop', 'Is Act ID'),
'status_id' => Yii::t('common/shop', 'Status Id'),
];
}
from that structure
CREATE TABLE `shop` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`partner_id` int(11) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`code` varchar(255) NOT NULL,
`lon` decimal(9,6) DEFAULT NULL COMMENT 'Долгота',
`lat` decimal(9,6) DEFAULT NULL COMMENT 'Широта',
`country_id` int(11) unsigned NOT NULL,
`region_id` int(11) unsigned NOT NULL,
`city_id` int(11) unsigned NOT NULL,
`address` varchar(255) NOT NULL,
`mall_name` varchar(255) DEFAULT NULL COMMENT 'Торговый центр',
`description` text,
`logo` varchar(255) DEFAULT NULL,
`is_active` tinyint(1) DEFAULT '0',
`status_id` int(11) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_shop_1_idx` (`partner_id`),
KEY `fk_shop_2_idx` (`status_id`),
KEY `fk_shop_3_idx` (`country_id`),
KEY `fk_shop_4_idx` (`region_id`),
KEY `fk_shop_5_idx` (`city_id`),
CONSTRAINT `fk_shop_1` FOREIGN KEY (`partner_id`) REFERENCES `partner` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_shop_2` FOREIGN KEY (`status_id`) REFERENCES `shop_status` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `fk_shop_3` FOREIGN KEY (`country_id`) REFERENCES `country` (`id`) ON UPDATE CASCADE,
CONSTRAINT `fk_shop_4` FOREIGN KEY (`region_id`) REFERENCES `region` (`id`) ON UPDATE CASCADE,
CONSTRAINT `fk_shop_5` FOREIGN KEY (`city_id`) REFERENCES `city` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Fixed as well.