www/horde-base

Nicki de Wet nicki at astcape.co.za
Thu Dec 20 00:40:15 PST 2007


The latest patch broke my horde, I get the following error when opening horde in the browser:

    Parse error: syntax error, unexpected T_STRING in /usr/local/www/horde/lib/Horde/NLS.php on line 122

This is the file that was patched.

Here is the patch file's contents:
--- lib/Horde/NLS.php.orig      2007-09-29 07:22:46.000000000 -0800
+++ lib/Horde/NLS.php   2007-12-18 11:16:03.000000000 -0900
@@ -119,6 +119,10 @@
                 setlocale(LC_ALL, $lang_charset);
             }
         }
+ <A0> <A0> <A0> <A0>/* avoid FreeBSD issapce(3) bug */
+ <A0> <A0> <A0> <A0>if(NLS::getCharset() == "UTF-8"){
+ <A0> <A0> <A0> <A0> <A0> <A0>setlocale(LC_CTYPE,"C");
+ <A0> <A0> <A0> <A0>}
         @putenv('LANG=' . $lang_charset);
         @putenv('LANGUAGE=' . $lang_charset);
     }

Here is what the file looks like now, obviously there were some funny characters:
                setlocale(LC_ALL, $lang_charset);
            }
        }
 \xa0 \xa0 \xa0 \xa0/* avoid FreeBSD issapce(3) bug */
 \xa0 \xa0 \xa0 \xa0if(NLS::getCharset() == "UTF-8"){
 \xa0 \xa0 \xa0 \xa0 \xa0 \xa0setlocale(LC_CTYPE,"C");
 \xa0 \xa0 \xa0 \xa0}
        @putenv('LANG=' . $lang_charset);
        @putenv('LANGUAGE=' . $lang_charset);
    }



This is what the patch should look like;
--- usr/local/www/horde/lib/Horde/NLS.php       Sat Sep 29 17:22:46 2007
+++ /usr/local/www/horde/lib/Horde/NLS.php      Thu Dec 20 10:38:46 2007
@@ -119,6 +119,10 @@
                 setlocale(LC_ALL, $lang_charset);
             }
         }
+        /* avoid FreeBSD issapce(3) bug */
+        if(NLS::getCharset() == "UTF-8"){
+          setlocale(LC_CTYPE,"C");
+        }
         @putenv('LANG=' . $lang_charset);
         @putenv('LANGUAGE=' . $lang_charset);
     }

Regards,
Nicki


More information about the freebsd-ports mailing list