HELP! Parse error: syntax error, unexpected T_VARIABLE

Discussion in 'PHP' started by chicknik, Jan 13, 2013.

  1. #1
    I have read in these forums trying to figure out my issue here. But, maybe someone can help please? It would be greatly appreciated.

    I am getting this error message: Parse error: syntax error, unexpected T_VARIABLE in /home/content/88/7019988/html/wp-includes/functions.php on line 192

    And this is the section of code where the problem is. I have no idea:

    * @return string Converted number in string format.
    */
    function number_format_i18n( $number, $decimals = 0 ) {
    global $wp_locale;
    $formatted = number_format( $number, absint( $decimals ), $wp_locale->number_format['decimal_point'], $wp_locale->number_format['thousands_sep'] );
    return apply_filters( 'number_format_i18n', $formatted );
    }


    /**
    * Convert number of bytes largest unit bytes will fit into.
    *
    * It is easier to read 1kB than 1024 bytes and 1MB than 1048576 bytes. Converts
    * number of bytes to human readable number by taking the number of that unit
    * that the bytes will go into it. Supports TB value.
    *
    * Please note that integers in PHP are limited to 32 bits, unless they are on
    * 64 bit architecture, then they have 64 bit size. If you need to place the
    * larger size then what PHP integer type will hold, then use a string. It will
    * be converted to a double, which should always have 64 bit length.
    *
    * Technically the correct unit names for powers of 1024 are KiB, MiB etc.
    * @link http://en.wikipedia.org/wiki/Byte
    *
    * @since 2.3.0
     
    chicknik, Jan 13, 2013 IP
  2. Callixtus

    Callixtus Greenhorn

    Messages:
    5
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    13
    #2
    as the code is right there its missing one / in front of the * on the first line ( /* @return string Converted number in string format. */ ) and also missing an end tag so everything under would be commented out.. *@since 2.3.0 */


    That is the first thing that strikes me tho :p but I guess that just a typo ?
     
    Callixtus, Jan 13, 2013 IP
  3. chicknik

    chicknik Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I left out that part when pasting in by mistake. So, it does have the / and */ end tags.
     
    chicknik, Jan 13, 2013 IP
  4. ryan_uk

    ryan_uk Illustrious Member

    Messages:
    3,983
    Likes Received:
    1,022
    Best Answers:
    33
    Trophy Points:
    465
    #4
    Have you customized functions.php for Wordpress? I am guessing you have and it's better not to modify the core files. Restore the functions.php to the original one by downloading Wordpress again from Wordpress.org (or http://wordpress.org/download/release-archive/ if it's older than 3.5). You don't need to reinstall the whole thing (just replace that one file) via FTP or whatever preferred method you have of uploading files to your host.
     
    ryan_uk, Jan 13, 2013 IP
  5. chicknik

    chicknik Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks, ryan_uk I am trying this. Just waiting now...
     
    chicknik, Jan 13, 2013 IP
  6. ryan_uk

    ryan_uk Illustrious Member

    Messages:
    3,983
    Likes Received:
    1,022
    Best Answers:
    33
    Trophy Points:
    465
    #6
    Fingers crossed for you, mate.

    If that sorts it, you could always start a thread about the customisations you were trying to make. Someone might know how to implement it through a theme or plugin.
     
    ryan_uk, Jan 13, 2013 IP
  7. chicknik

    chicknik Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    It's worked! Thanks for all your help.
     
    chicknik, Jan 13, 2013 IP