表单突然无法正确过帐yii

表单突然无法正确过帐yii,yii,Yii,在过去的几周里一切都很好,但我不知道发生了什么。。。 每次我提交时,它给我的用户\产品\ id不能为空 <?php echo $form->dropDownList($model,'user_product_id', CHtml::listData(Product::model()->findAllByAttributes(array('store_id'=>$store_id)),'product_id','product_name'), array(

在过去的几周里一切都很好,但我不知道发生了什么。。。 每次我提交时,它给我的
用户\产品\ id
不能为空

<?php echo $form->dropDownList($model,'user_product_id', 
    CHtml::listData(Product::model()->findAllByAttributes(array('store_id'=>$store_id)),'product_id','product_name'),
    array('prompt'=>'Select Your Product'));
        ?>

var\u dump
$product\u id
以及整个表达式提供一个整数…

product::model()->findbypk($product\u id)
可能返回空。请检查验证规则。看起来您的某个规则未验证。
$model->target_id = Product::model()->findbypk($product_id)->name_id;