error in session CodeIgniter

0

I have a dynamic menu that does a search in the database and fills in this menu, when I'm in home it works normally but when the page changes the value returns null and it generates error in count() , I noticed that whenever I change page to table ci_session updates in the database, I never moved with codeIgniter before and I do not know if this is normal. Can anyone help me?

$redes = $this->session->userdata('redes');
                            if(!empty($redes)) {
                                if (count($redes) > 0) {
                                    for ($i = 0; $i < count($redes); $i++) {
                                        echo '<li class="skew-25"><a href="' . $redes[$i]['url'] . '" target="_blank" data-title="' . $redes[$i]['titulo'] . '" data-tooltip="true"><span class="fa ' . $redes[$i]['class'] . ' skew25"></span></a></li>';
                                    }
                                }
                            }
    
asked by anonymous 18.09.2018 / 17:16

0 answers