PHP notice

Undefined index: sid

C:\etc\Apache\htdocs\MSSQL\application\views\admin\expressions\test\survey_logic_file.php(11)

01 <?php
02 if (count($_GET) > 0) {
03     foreach ($_GET as $key=>$val) {
04         if ($key == 'sid') {
05             $val = $val . '|N'; // hack to pretend this is not an assessment
06         }
07         $_REQUEST[$key] = $val;
08     }
09     $_REQUEST['LEM_PRETTY_PRINT_ALL_SYNTAX'] = 'Y';
10 
11     $surveyinfo = getSurveyInfo(sanitize_int($_REQUEST['sid']));
12     if (isset($surveyinfo['assessments']) && $surveyinfo['assessments']=='Y')
13     {
14         $_REQUEST['assessments'] = 'Y';
15     }
16 }
17 
18 $clang = Yii::app()->lang;
19 Yii::app()->loadHelper('frontend');
20 
21 if (empty($_REQUEST['sid']))   //  || count($_REQUEST) == 0) {
22 {
23     $query = "select a.surveyls_survey_id as sid, a.surveyls_title as title, b.datecreated, b.assessments "

Stack Trace

#4
+
 C:\etc\Apache\htdocs\MSSQL\application\controllers\admin\expressions.php(42): CController->render("/admin/expressions/test/survey_logic_file")
37     <?php
38     }
39 
40     protected function test($which)
41     {
42         $this->getController()->render('/admin/expressions/test/'.$which);
43     }
44 
45     private function _printOnLoad($which)
46     {
47         switch ($which)
#5
+
 C:\etc\Apache\htdocs\MSSQL\application\controllers\admin\expressions.php(32): Expressions->test("survey_logic_file")
27         <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->getConfig('adminstyleurl')."adminstyle.css"; ?>" />
28     </head>
29     <body <?php $this->_printOnLoad(Yii::app()->request->getQuery('sa', 'index'))?>>
30     <?php
31         if(isset($_GET['sa']))
32             $this->test($_GET['sa']);
33         else $this->getController()->render('/admin/expressions/test_view');
34     ?>
35     </body>
36 </html>
37     <?php
#8
+
 C:\etc\Apache\htdocs\MSSQL\application\core\Survey_Common_Action.php(82): CAction->runWithParamsInternal(Expressions, ReflectionMethod, array("sa" => "survey_logic_file"))
77             $oMethod = new ReflectionMethod($this, $sDefault);
78         }
79 
80         // We're all good to go, let's execute it
81         // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
82         return parent::runWithParamsInternal($this, $oMethod, $params);
83     }
84 
85     /**
86     * Some functions have different parameters, which are just an alias of the
87     * usual parameters we're getting in the url. This function just populates
2012-10-24 07:38:30 Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 Yii Framework/1.1.10