Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#8579 closed defect (bug) (invalid)

Empty lines at the end of functions.php break profile.php

Reported by: pampfelimetten's profile pampfelimetten Owned by:
Milestone: Priority: normal
Severity: major Version:
Component: General Keywords: functions.php, breaks, profile, update
Focuses: Cc:


my functions.php in my theme looks like this:

function test_custom_login() {

echo '<link rel="stylesheet" type="text/css" href="' . get_bloginfo('template_directory') . '/login.css" />';

add_action('login_head', 'test_custom_login');

It works fine, but when I want to update my user profile, I just get a blank page.

No plugins, happens in ff and opera on ubuntu

If I rename the functions.php to functionslsjkjlkjj.php, it works again.

Change History (4)

#1 @pampfelimetten
15 years ago

ah, and the css works just fine! =)

#2 @ionfish
15 years ago

With the steps you've just outlined, I can't reproduce this.

#3 @pampfelimetten
15 years ago

  • Keywords login_head removed

I can reproduce it on two other installs as well...

AHH... its not about the function itself: It gets triggered by empty lines at the end of functions.php
Thats not intentional, isn't it?

#4 @azaozz
15 years ago

  • Milestone 2.7.1 deleted
  • Resolution set to invalid
  • Status changed from new to closed
  • Summary changed from add_action to login_head breaks profile.php to Empty lines at the end of functions.php break profile.php
  • Version 2.7 deleted

How about removing the php closing tag, the ?>

Think that's the coding standard in many php apps, perhaps we should adopt it too.

Note: See TracTickets for help on using tickets.