themachinist / DiscourseSkin

6 stars 1 forks source link

Icon errors #2

Open Damillora opened 10 years ago

Damillora commented 10 years ago

This is the error I have said in the pull request I have discovered errors, related to icon_class.

Screenshot: asafsfasd

This one is related to the Echo extension: sgdssdg Can you figure out the solution?

themachinist commented 10 years ago

yes, i will make a revision. in this instance it isn't checking to see if the array key exists prior to trying to use it. that was a poor decision on my part

    echo '<ul class="nav nav-pills" id="navigation-bar">';
        foreach ( $value as $views ){
            if ( !is_null($views) ){
            // whoops:
                echo <<<HTML
                <li class="{$views['class']}" title="{$views['text']}">
                    <a href="{$views['href']}"><i class="fa {$views['icon_class']}"></i>{$views['text']}</a>
                </li>
HTML;
            }
        }
    echo '</ul>';

in the mean time, you could disable reporting of E_NOTICE level errors:

error_reporting(E_ALL & ~E_NOTICE);