1

I'm getting this error after I manually updated my wordpress install:

Parse error: syntax error, unexpected T_FUNCTION

This is the code causing the error:

function paginate_links($args = ''){
$defaults = array(
    'base' => '%_%', // http://example.com/all_posts.php%_% : %_% is replaced by format (below)
    'format' => '?page=%#%', // ?page=%#% : %#% is replaced by the page number
    'total' => 1,
    'current' => 0,
    'show_all' => false,
    'prev_next' => true,
    'prev_text' => __('« Previous'),
    'next_text' => __('Next »'),
    'end_size' => 1,
    'mid_size' => 2,
    'type' => 'plain',
    'add_args' => false, // array of query args to add
    'add_fragment' => '');
}

Can anyone help?

2
  • 1
    Which line is the error in? Commented Dec 14, 2012 at 9:22
  • This one: function paginate_links($args = ''){ Commented Dec 14, 2012 at 9:50

1 Answer 1

0

what so you mean by manually? you didn't use the build in updater? if not did you run the update scripts?

  1. wp-admin/update.php
  2. wp-admin/upgrade.php
  3. wp-admin/update-core.php

do one by one and see if it's fixed in between.

Sign up to request clarification or add additional context in comments.

4 Comments

Thank you for the reply! I tried them but it still gives me an error: Parse error: syntax error, unexpected T_FUNCTION in D:\inetpub\vhosts\profitablehospitality.com\httpdocs\News\wp-includes\general-template.php on line 508 I didn't use the automatic update because it didn't work. So I just manually updated it by uploading the files.
I followed the instructions. I deleted the wp-include and wp-admin folders. I uploaded the new wp-include and wp-admin folders to my server. I Uploaded the individual files from the new wp-content folder to your existing wp-content folder, overwriting existing files. I Uploaded all new loose files from the root directory of the new version to your existing wordpress root directory. And when I tried to go to my admin page, that error showed up
I asume you followed this: codex.wordpress.org/Updating_WordPress#Manual_Update? it states: Take a Backup A lesson you will never forget ;). Do take a look here: codex.wordpress.org/Upgrading_WordPress_Extended

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.