Cameron Cameron - 2 months ago 11
PHP Question

Unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR

I'm trying to run a WordPress plugin, and I get the following error:

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION
or T_FUNCTION or T_VAR or '}' in
/nfs/c03/h05/mnt/52704/domains/creathive.net/html/wp-content/plugins/qr-code-tag/lib/qrct/QrctWp.php
on line 13


What would cause this error? Line 13 is the public bit.

EDIT: Here is some code:

class QrctWp
{
public $pluginName = 'QR Code Tag';

Answer

Running on PHP4 by any chance? That's what the error message at this location would usually indicate.

Remove all public and private attributes. Though it's unlikely the plugin will work perfectly with the older object instance handling.