PHP warning

Undefined array key "the_file"

/media/shnoulle/data/www/master/application/controllers/SurveyAdministrationController.php(2405)

2393         //everybody who has permission to create surveys
2394         if (!Permission::model()->hasGlobalPermission('surveys', 'create')) {
2395             App()->user->setFlash('error', gT("Access denied"));
2396             $this->redirect(App()->request->urlReferrer);
2397         }
2398 
2399         $aData = [];
2400         $sExtension = "";
2401 
2402         $aData['sHeader'] = gT("Import survey data");
2403         $aData['sSummaryHeader'] = gT("Survey structure import summary");
2404         $aData['textCompleted'] = gT("Import of survey is completed.");
2405         $aPathInfo = pathinfo((string) $_FILES['the_file']['name']);
2406 
2407         if (isset($aPathInfo['extension'])) {
2408             $sExtension = $aPathInfo['extension'];
2409         }
2410 
2411         $aData['bFailed'] = false;
2412 
2413         $sFullFilepath = App()->getConfig('tempdir') . DIRECTORY_SEPARATOR . randomChars(30) . '.' . $sExtension;
2414         if ($_FILES['the_file']['error'] == 1 || $_FILES['the_file']['error'] == 2) {
2415             $aData['sErrorMessage'] = sprintf(gT("Sorry, this file is too large. Only files up to %01.2f MB are allowed."), getMaximumFileUploadSize() / 1024 / 1024) . '<br>';
2416             $aData['bFailed'] = true;
2417         } elseif (!in_array(strtolower($sExtension), array('lss', 'txt', 'tsv', 'lsa'))) {

Stack Trace

#5
+
 /media/shnoulle/data/www/master/application/controllers/LSBaseController.php(145): CController->run("import")
140                     $this->redirect(array('/admin/authentication/sa/login'));
141                 }
142             }
143         }
144 
145         parent::run($action);
146     }
147 
148     /**
149      * Load and set session vars
150      *
#9
+
 /media/shnoulle/data/www/master/index.php(161): CApplication->run()
156 require_once APPPATH . 'core/LSYii_Application' . EXT;
157 
158 $config = require_once(APPPATH . 'config/internal' . EXT);
159 
160 Yii::$enableIncludePath = false;
161 Yii::createApplication('LSYii_Application', $config)->run();
162 
163 /* End of file index.php */
164 /* Location: ./index.php */
2026-02-05 17:08:47 nginx/1.26.3 Yii Framework/1.1.31