The Serendipity Handbook

You can now read the (german) handbook here: PDF - https://github.com/s9y/Book (LaTeX source).

Forum-Information

Before posting about errors, make sure that the answer cannot already be found in our FAQ or by searching this forum!
Posting is restricted to registered users (registering is free and simple!) due to recent spam attacks. When having trouble with this board, contact garvin(-at)s9y(-dot)org.

Board index Bugs Parse error: syntax error, unexpected T_STRING

Found a bug? Tell us!!
fyremoon
 
Posts: 2
Joined: Sat Dec 20, 2008 3:07 pm

Postby fyremoon » Sat Jul 24, 2010 10:29 pm

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.

User avatar
garvinhicking
Core Developer
 
Posts: 28944
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany

Postby garvinhicking » Sun Jul 25, 2010 12:25 am

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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

User avatar
Don Chambers
Regular
 
Posts: 3077
Joined: Mon Feb 13, 2006 3:40 am
Location: Chicago, IL, USA

Postby Don Chambers » Tue Jul 27, 2010 4:55 pm

Odd.... I never encountered this problem in php 5.3.0 either.



Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest