Home > Backend Development > PHP Tutorial > PHP warning Creating default object from empty value problem solution_PHP tutorial

PHP warning Creating default object from empty value problem solution_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 10:34:53
Original
1115 people have browsed it

The solution is to find the location where the error is reported and see which variable is used directly without initialization. Instantiate this variable into an empty class first. For example:

Copy code The code is as follows:
$ct = new stdClass();

Modify the corresponding code of the file, For example:
Copy code The code is as follows:
if ( ! isset( $themes[$current_theme] ) ) {
delete_option( 'current_theme' );
$current_theme = get_current_theme();
}
$ct = new stdClass();
$ct-> name = $current_theme;

Problem solved.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/748679.htmlTechArticleThe solution is to find the location of the error and then see which variable is used directly without initialization, and instantiate this variable first Make an empty class. For example: Copy the code The code is as follows: $ct = ne...
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template