WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#3883 closed defect (bug) (fixed)

PHP Fatal error: Call to undefined function is_wp_error() in /wp-includes/functions.php on line 1299 w/ patch

Reported by: tacker Owned by:
Milestone: 2.2 Priority: high
Severity: normal Version: 2.2
Component: General Keywords:
Focuses: Cc:

Description

Happens if you access a fresh wp installation.

Fix:

  • wp-includes/functions.php

     
    11<?php 
    22 
    33require_once(dirname(__FILE__).'/compat.php'); 
     4require_once(dirname(__FILE__).'/classes.php'); 
    45 
    56function mysql2date($dateformatstring, $mysqlstring, $translate = true) { 
    67       global $wp_locale; 

Change History (5)

comment:1 tacker7 years ago

My first fix breaks other stuff.

This works:

  • wp-blog-header.php

     
    55       if ( strstr( $_SERVER['PHP_SELF'], 'wp-admin') ) $path = ''; 
    66       else $path = 'wp-admin/'; 
    77 
     8  require_once( dirname(__FILE__) . '/wp-includes/classes.php'); 
    89  require_once( dirname(__FILE__) . '/wp-includes/functions.php'); 
    910  wp_die("There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started. Need more help? <a href='http://codex.wordpress.org/Editing_wp-config.php'>We got it</a>. You can <a href='{$path}setup-config.php'>create a <code>wp-config.php</code> file through a web interface</a>, but this doesn't work for all server setups. The safest way is to manually create the file.", "WordPress &rsaquo; Error"); 
    1011} 

comment:2 foolswisdom7 years ago

  • Milestone set to 2.2

Thanks for the patch!

What version are you running including svn revision? What server environment?

Would you attach patches instead of posting inline (include the project's path structure in your patch)?

comment:3 ryan7 years ago

Should already be fixed by [4926]

comment:4 ryan7 years ago

Oops, nevermind. This is a different case.

comment:5 ryan7 years ago

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

(In [4973]) Fix wp_die() includes when bailing out in the blog header. Props tacker. fixes #3883

Note: See TracTickets for help on using tickets.