PHP notice

Undefined offset: 3

/var/www/html/protected/views/budget/expenses_industry2018.php(44)

32         'Национальная оборона': 'Прочие расходы',
33         'Национальная безопасность и правоохранительная деятельность': 'Прочие расходы',
34         'Охрана окружающей среды': 'Прочие расходы',
35         'Физическая культура и спорт': 'Прочие расходы',
36         'Обслуживание государственного и муниципального долга': 'Прочие расходы'
37     }
38 </script>
39 <?php
40 $chart_data = array();
41 foreach($industries as $key => $industry) {
42     if($key != 0) {
43         $chart_data[2018][] = array($industry[1], $industry[2]);
44         $chart_data[2019][] = array($industry[1], $industry[3]);
45         $chart_data[2020][] = array($industry[1], $industry[4]);
46     }
47 }
48 
49 function mySort($a, $b)
50 {
51     if($a['0'] == $b['0'])
52         return 0;
53     if($a['0'] < $b['0'])
54         return -1;
55     else
56         return 1;

Stack Trace

#3
+
 /var/www/html/protected/components/BaseController.php(191): CController->renderPartial("/budget/expenses_industry2018", array("industries" => array(array("0600", "ОХРАНА ОКРУЖАЮЩЕЙ СРЕДЫ", 137.04, 130.19, ...), array("0601", "Экологический контроль", 3.46, 3.46, ...), array("0603", "Охрана объектов растительного и жи...", 59.22, 54.76, ...), array("0604", "Прикладные научные исследования в ...", 20), ...)), false, false)
186     {
187 //        if (isset($_GET['special']) && strpos($view, "special/") === false) {
188 //            $view = '/special/' . $view;
189 //        }
190 
191         return parent::renderPartial($view, $data, $return, $processOutput);
192     }
193 
194     protected function _render404() {
195         $this->content = 'Страница находится в разработке';
196         $this->render($this->pageConstruct);
#4
+
 /var/www/html/protected/views/layouts/budgetLayout.php(78): BaseController->renderPartial("/budget/expenses_industry2018", array("industries" => array(array("0600", "ОХРАНА ОКРУЖАЮЩЕЙ СРЕДЫ", 137.04, 130.19, ...), array("0601", "Экологический контроль", 3.46, 3.46, ...), array("0603", "Охрана объектов растительного и жи...", 59.22, 54.76, ...), array("0604", "Прикладные научные исследования в ...", 20), ...)))
73             <section class="content gap_50" style="<?php echo (!isset($this->hideLeftMenu) || !$this->hideLeftMenu) ? 'margin-left: 310px;' : '';?>">
74                 <?php
75                 if($this->content)
76                     echo $this->content;
77                 if($this->PartialContent)
78                     $this->renderPartial($this->PartialContent, $this->GetViewData($this->PartialContent));
79                 ?>
80             </section>
81         </div>
82     </div>
83     <?php $this->renderPartial('/layouts/footer') ?>
#8
+
 /var/www/html/protected/components/BaseController.php(182): CController->render("/site/index", null, false)
177     {
178 //        if (isset($_GET['special'])) {
179 //            $view = '/special/' . $view;
180 //        }
181 
182         return parent::render($view, $data, $return);
183     }
184 
185     public function renderPartial($view, $data=null, $return=false, $processOutput=false)
186     {
187 //        if (isset($_GET['special']) && strpos($view, "special/") === false) {
2023-05-30 06:52:15 Apache/2.4.6 () mod_fcgid/2.3.9 PHP/7.0.0 Yii Framework/1.1.14