Error in Wordpress Arras theme options.php file

This issue is with a wordpress theme, but it’s related to a php file so I’m posting this question here hoping some of the php experts may be able to help or point me in the right direction. I’m trying to install the Arras Wordpress theme and as soon as I activate it the site and the WP-admin screen both display the following error message:

Parse error: syntax error, unexpected ‘=’, expecting ‘)’ in /home/content/s/n/a/file/html/filename/wp-content/themes/arras/library/admin/options.php on line 216

Because the site and WP-admin dashboard both broke, I had to go into file manager and delete the Arras files completely. I’ve attached the options.php info in a word doc [Ed: in a text file]. Is it possible for anyone to look at the error message and code to figure out why this isn’t working?

Also, I deleted all of the plug-ins on the site and uninstalled and reinstalled the Arras theme and the error is still there. I emailed the theme developer and posted this question in the Arras forums, but I found the same error posted by other users over the past month without a single response. I don’t know php and I’m not sure if it’s an error in the code or something that the theme is not compatible with in the WP install. I currently use the Arras theme on my primary site and haven’t had any issues there.

Any suggestions are appreciated.

You’ll find that you’re facing a common problem. Just go to the Arres Theme forum page and you’ll find that you are not along in the trouble you are having.

The unexpected equals comes from this line:

function _chain_update_posttypes(&$posttype, $new_posttype, &$taxonomy, &$category = null) {

The PHP page about function arguments has a note, that says:

Note: As of PHP 5, default values may be passed by reference.

I presume that it’s correct to assume you are running on PHP 4?

If so, your problem is that PHP 4 does not allow default values to be assigned to function arguments that are passed by reference.

You can fix that by removing the default assignment, and explicitly perform that check from the start of the function.


function _chain_update_posttypes(&$posttype, $new_posttype, &$taxonomy, &$category) {
    if (empty($category)) {
        $category = null;
    }
    ...

Paul, it worked! I can’t tell you how grateful I am, THANK YOU!!! You’ve completely made my day :):):slight_smile:

Wendy