Make WordPress Core

Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#2154 closed defect (bug) (fixed)

Parse error in templates.php

Reported by: skithund's profile skithund Owned by:
Milestone: Priority: normal
Severity: critical Version: 2.0
Component: Administration Keywords:
Focuses: Cc:

Description

Parse error: syntax error, unexpected '}' in /www/selfdestruct.net/docs/wp-admin/templates.php on line 164
Errors parsing /www/selfdestruct.net/docs/wp-admin/templates.php

Attachments (1)

templates.php.diff (473 bytes) - added by skithund 19 years ago.
Fix short open tags in wp-admin/templates.php

Download all attachments as: .zip

Change History (12)

#1 @Viper007Bond
19 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

Works fine here. Try reuploading the file to your site, it probably uploaded wrong.

Reopen if it still won't work and provide more details if possible.

#2 @skithund
19 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

Still not working. Here are the three easy steps to reproduce the bug.

[toni@shaolin:/tmp/wordpress]$ wget http://wordpress.org/latest.tar.gz
--08:53:33--  http://wordpress.org/latest.tar.gz
           => `latest.tar.gz'
Resolving wordpress.org... 72.36.137.146
Connecting to wordpress.org|72.36.137.146|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/octet-stream]

08:53:35 (251.42 KB/s) - `latest.tar.gz' saved [495411]

[toni@shaolin:/tmp/wordpress]$ tar -zxf latest.tar.gz
[toni@shaolin:/tmp/wordpress]$ php -l wordpress/wp-admin/templates.php

Parse error: syntax error, unexpected '}' in wordpress/wp-admin/templates.php on line 164
Errors parsing wordpress/wp-admin/templates.php

#3 @skithund
19 years ago

And it's reproducible with SVN templates.php

[toni@shaolin:/tmp/wordpress]$ wget http://svn.automattic.com/wordpress/trunk/wp-admin/templates.php
--08:57:11--  http://svn.automattic.com/wordpress/trunk/wp-admin/templates.php
           => `templates.php'
Resolving svn.automattic.com... 207.7.108.189
Connecting to svn.automattic.com|207.7.108.189|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4,865 (4.8K) [text/plain]

08:57:12 (94.69 MB/s) - `templates.php' saved [4865/4865]

[toni@shaolin:/tmp/wordpress]$ php -l templates.php

Parse error: syntax error, unexpected '}' in templates.php on line 164
Errors parsing templates.php

#4 @johnjosephbachir
19 years ago

fwiw, i tried it and it worked, first with PHP 4.3.11, then with PHP 5.1.1

jjb-g4-laptop:~/tmp$ wget http://wordpress.org/latest.tar.gz
--02:34:57--  http://wordpress.org/latest.tar.gz
           => `latest.tar.gz'
Resolving wordpress.org... 72.36.137.146
Connecting to wordpress.org|72.36.137.146|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/octet-stream]

    [      <=>                                                 ] 495,411      455.56K/s             

02:34:59 (454.19 KB/s) - `latest.tar.gz' saved [495411]

jjb-g4-laptop:~/tmp$ tar -zxf latest.tar.gz
jjb-g4-laptop:~/tmp$ php -l wordpress/wp-admin/templates.php
No syntax errors detected in wordpress/wp-admin/templates.php
jjb-g4-laptop:~/tmp$ /usr/local/bin/php -l wordpress/wp-admin/templates.php
No syntax errors detected in wordpress/wp-admin/templates.php

#5 @Viper007Bond
19 years ago

Latest SVN copy works fine here on Windows + PHP 5.0.5 (my home PC), Linux + PHP 4.3.11 (my personal blog), and Linux + PHP 4.4.1 (another site I run).

What version of PHP are you using?

#6 @skithund
19 years ago

Parse errors with PHP 5.1.1 on FreeBSD and Mac OSX but not on Linux or Solaris.
PHP 4.4.1 on NetBSD works too.
This is interesting.

@skithund
19 years ago

Fix short open tags in wp-admin/templates.php

#7 @skithund
19 years ago

There's two rows in templates.php where short open tag is used.

#8 @Viper007Bond
19 years ago

Ahhh. Odd though, thought I had short tags disabled on my local install. :/

#9 @ryan
19 years ago

  • Milestone set to 2.1
  • Resolution set to fixed
  • Status changed from reopened to closed

#10 @ryan
19 years ago

  • Milestone changed from 2.1 to 2.0.1

#11 @(none)
18 years ago

  • Milestone 2.0.1 deleted

Milestone 2.0.1 deleted

Note: See TracTickets for help on using tickets.