futuresight / futurebb

The forum system by FutureSight Technologies. A live sample can be seen at http://futuresight.org/forums
http://futurebb.futuresight.org
2 stars 2 forks source link

Undefined offset: 1 when no trailing slash on nginx #185

Open iggyvolz opened 7 years ago

iggyvolz commented 7 years ago

Example: https://prince.yingatech.com/forums (no trailing slash - works fine with it)

Returns: Notice: Undefined offset: 1 in /path/to/forums/dispatcher.php on line 81

Notice: Invalid data type for escape. Expected string, got NULL. in /path/to/forums/app_resources/database/mysqli.php on line 48

jacob-g commented 7 years ago

Thank you for letting me know. I will fix this in version 1.5. In the meantime, I think you can fix this by adding a page entry with no URL at all (i.e. leave the URL field blank).

iggyvolz commented 7 years ago

That didn't fix the issue, but I was able to put in a rewrite rule to patch the problem by changing the main rewrite block to /forums/ and adding the following rule after it:

location ~ /forums {
        return 301 /forums/;
}