registerPackage and misplaced Css

Hi all,

When I use this code in a controller:




        $cs = Yii::App()->getClientScript();

        $cs->packages = array(

            'search-pack'=>array(

                'basePath'=>'packages.search',

                'baseUrl'=>'packages/search',

                'js'=>array('search.js'),

                'css'=>array('search.css'),

                'depends'=>array('jquery','jquery.ui'),

            ),

            

        );

        $cs->coreScriptPosition = CClientScript::POS_END;

        


       $cs->registerPackage('search-pack');



The js script is well placed (at the end of html body

but the Css is just after </head>, which is not an expected behavior …

This is the result:




</head><link rel="stylesheet" type="text/css" href="/amayiii/packages/search/search.css" />

<body class="main">

...



Is it because I misunderstood something in the Yii doc or is it a bug ?

Thanks