Page 1 of 1

Parse error: syntax error, unexpected T_STRING

Posted: Sat Jul 24, 2010 10:29 pm
by fyremoon
Hello,

I've just updated my PHP from 5.2 to 5.3.2 and got the following error:
Parse error: syntax error, unexpected T_STRING in /home/serendipity/include/functions_entries.inc.php on line 1433

On line 1433, the DELETE FROM lines have double quotes on four lines for $serendipity["dbPrefix"] where they should be $serendipity['dbPrefix']
serendipity_db_query("DELETE FROM {$serendipity["dbPrefix"]}entries WHERE i
serendipity_db_query("DELETE FROM {$serendipity["dbPrefix"]}entrycat WHERE
serendipity_db_query("DELETE FROM {$serendipity["dbPrefix"]}entryproperties
serendipity_db_query("DELETE FROM {$serendipity["dbPrefix"]}comments WHERE
serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}references WHER
serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}permalinks WHER

Oddly enough, this wasn't noticed by PHP 5.2

This is using serendipity 1.5.3 (tar.gz) from this website.

Re: Parse error: syntax error, unexpected T_STRING

Posted: Sun Jul 25, 2010 12:25 am
by garvinhicking
Hi!

Thanks a lot! I wasn't aware of this, I'm also curious why this worked in earlier versions. I patched it as per your suggestion (simply change ["dbprefix"] to ['dbprefix']) and it surely works fine. I'll see to come up with a new release for this and meanwhile announce it on the blog.

Thanks,
Garvin

Re: Parse error: syntax error, unexpected T_STRING

Posted: Tue Jul 27, 2010 4:55 pm
by Don Chambers
Odd.... I never encountered this problem in php 5.3.0 either.