WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#8579 closed defect (bug) (invalid)

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

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

Description

my functions.php in my theme looks like this:

<?php
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)

comment:1 @pampfelimetten6 years ago

ah, and the css works just fine! =)

comment:2 @ionfish6 years ago

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

comment:3 @pampfelimetten6 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?

comment:4 @azaozz6 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.