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?

Leigh
  • 28,765
  • 10
  • 55
  • 103

1 Answers1

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.

janw
  • 6,672
  • 6
  • 26
  • 45
  • 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. – christinekimc Dec 14 '12 at 09:48
  • 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 – christinekimc Dec 14 '12 at 09:57
  • I asume you followed this: http://codex.wordpress.org/Updating_WordPress#Manual_Update? it states: **Take a Backup** A lesson you will never forget ;). Do take a look here: http://codex.wordpress.org/Upgrading_WordPress_Extended – janw Dec 14 '12 at 12:08
  • did you do http://codex.wordpress.org/Upgrading_WordPress_Extended? – janw Dec 14 '12 at 12:48