Previously there is php request like

$bidStart = isset($_REQUEST['sales_start']) ? date('Y-m-d',strtotime($_REQUEST['sales_start'])) : date('Y-m-d',strtotime('sunday -6 weeks'));

now I write this in yii framework like this

$sales_start = Yii::app()->request->getParam('sales_start', '' );

$bidStart = isset($sales_start) ? date('Y-m-d',strtotime($sales_start)) : date('Y-m-d',strtotime('sunday -6 weeks')


but this is not working in browser gives error A script inn this movie causing adobe flash player to run slowly. if you continue to run this cause your computer unresponsive.

No correct solution


$sales_start = Yii::app()->request->getParam('sales_start', '' );

$bidStart = isset($sales_start) ?

$sales_start will always be set, even it if it '' that still means it is set. Try
$bidStart = !empty($sales_start) ?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow