• I am using wp-syntax successfully for PHP and HTML but when I try to use it for ASP I get these warning messages above the content:

    Warning: Invalid argument supplied for foreach() in /www/wpintranet/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2281

    Warning: Invalid argument supplied for foreach() in /www/wpintranet/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2281

    Warning: Invalid argument supplied for foreach() in /www/wpintranet/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2281

    I am trying to display:

    <html>
    <head>
    <title>ASP.NET Hello World-TEST SCRIPT</title>
    </head>
    <body>
    <h1>
    <p>Hello World! HOW are you?</p></h1>
    <p>< %Response.Write(now())%></p>
    
    <p>You are < %=Request.ServerVariables("LOGON_USER")%></p>
    
    <p>i am < %= System.Security.Principal.WindowsIdentity.GetCurrent().Name %></p>
    
    </body>
    </html>

    Are there any fixes?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter nfsupport

    (@nfsupport)

    addition: ive added display_errors = off to my php.ini to suppress this warning message but i’d like to solve the problem.

    the warnings only come up when selecting “asp” as the language. the code referenced in the warning is:

    foreach($this->language_data['SYMBOLS'] as $key => $symbols) {
                    if(is_array($symbols)) {
                        foreach($symbols as $sym) {
                            if(!isset($symbol_data[$sym])) {
                                $symbol_data[GeSHi::hsc($sym)] = $key;
                                $symbol_preg[] = preg_quote(GeSHi::hsc($sym), '/');
                            }
                        }
                    } else {
                        if(!isset($symbol_data[$symbols])) {
                            $symbol_data[GeSHi::hsc($symbols)] = 0;
                            $symbol_preg[] = preg_quote(GESHI::hsc($symbols), '/');
                        }
                    }
                }

    any help would be appreciated

    @nfsupport, I was able to reproduce. This looks like a bug in GeSHi.

    I haven’t tested this yet, but I think this is caused because because the left side of the foreach statement should really be language_data['STYLES']['SYMBOLS']

    Would you mind submitting a bug report to the GeSHi team or at least notifying them on their mailing list? Thanks.

    Thread Starter nfsupport

    (@nfsupport)

    thanks for your input. it sounds like the fix would be far beyond my skills/knowledge. I will definitely submit this through the link you gave me.

    I love this specific SyntaxHighlighter because the way it is laid out looks a lot nicer than wp-syntax but it doesn’t have nearly as many languages supported unfortunately

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WP-Syntax] support for ASP doesn’t seem to work’ is closed to new replies.