c006 / yii2-migration-utility

Automatically writes the create tables for migrations or create tables in general. Uses MySQL
MIT License
64 stars 35 forks source link

Probably incorrect array check. #32

Open sergekiryakov opened 3 years ago

sergekiryakov commented 3 years ago

https://github.com/c006/yii2-migration-utility/blob/5b89422facc97ef5e5364f2cdcea6fd31f5c65de/assets/AppUtility.php#L105 strlen() returns params error

jwn81 commented 1 year ago

This seems to be a Bug and can be fixed in the line you referenced by correcting the line into this one: $this->string .= (strlen($this->array['defaultValue']['expression']) == 0) ? '' : " DEFAULT " . $this->array['defaultValue']['expression'] . " ";

The strlen() has to look into the according tree.