Opened 15 years ago
Closed 15 years ago
#9393 closed defect (bug) (fixed)
PHP notices for WordPress 2.8
Reported by: | Viper007Bond | Owned by: | |
---|---|---|---|
Milestone: | 2.8 | Priority: | lowest |
Severity: | minor | Version: | 2.8 |
Component: | Warnings/Notices | Keywords: | has-patch tested commit |
Focuses: | Cc: |
Description
Been catching a lot of PHP notices lately and rather than making a ton of more tickets, I figured one per milestone would be better.
So here's one for 2.8. Feel free to attach patches of your own to this ticket.
Other notice tickets: #9292 #9309 #9333 #9336 #9365 #9366 #9367 #9369 #9370 #9392 (plus more probably)
Attachments (18)
Change History (49)
#4
@
15 years ago
I included a fix for a notice (Undefined index: metakeyselect in admin-ajax.php) in #7541.
@
15 years ago
Notice fix for media upload. check if WP_ADMIN is defined before trying to define it.
@
15 years ago
Only check for unique user_nicename when updating since a user_id hasn't been created for a new user yet
#6
@
15 years ago
Patches still waiting:
9393-plugin-editor.diff
9393-registration.diff
9393-wp_handle_upload.diff
@
15 years ago
Sometimes the sticky option has value of 'Array'. It has been fixed, but until changing it I get the notices. Another check won't harm.
#9
@
15 years ago
- Cc matt@… added
Patches still waiting:
9393-plugin-editor.diff
9393-registration.diff
9393-wp_handle_upload.diff
9393-widgets.diff
9393-sticky.diff
9393-widgets-var-notice.diff
#10
@
15 years ago
Added patch for wp-admin\includes\template.php fixes notice for author ID function.
#16
@
15 years ago
Todo:
- 9393-registration.diff - need to spend a little time understanding issue
- 9393-widgets-var-notice.diff - no longer applies
- template.diff - need more detail to understand issue.
#17
@
15 years ago
Perhaps a better way to handle 9393-registration.diff is to instead of excluding ID of the user being updated created is to use the user_login.
When creating a user the users ID does not exist and is of course not in the database yet. So a notice is thrown reporting that $ID is undefined. Instead of using ID perhaps user_login would be better.
#18
@
15 years ago
template.diff - need more detail to understand issue
The patch changes the call to the_author_ID which otherwise on current trunk produces PHP Notice: the_author_ID is deprecated since version 2.8! on the edit posts screen.
@
15 years ago
Replaces template.diff as this fixes the notice in 2 locations where as the other missed one
#19
@
15 years ago
Apologies on the file extension for that last one. I don't know what I was thinking.
#21
@
15 years ago
Added patch for post_template to use get_the_author_meta ('display_name') instead of deprecated get_author_name function, fixes notice shown on publishing new posts.
@
15 years ago
This patch replaces post_template.patch. Replaces get_author_name in all locations in which it is used
@
15 years ago
This patch replaces post_template.patch. Replaces get_author_name in all locations in which it is used
#26
in reply to:
↑ 25
@
15 years ago
Also getting a notice while trying to add a category in edit.php (rev. 11372):
Notice: Trying to get property of non-object in /home/cristi/svn/wp/wp-includes/category-template.php on line 91
@
15 years ago
Last round of replacements for deprecated get_the_author_* and the_author_* functions.
#28
follow-up:
↓ 31
@
15 years ago
A few notices on the new widgets page now -
PHP Notice: Undefined index: count in E:\webpage\svn\trunk\wp-includes\default-widgets.php on line 493 PHP Notice: Undefined index: hierarchical in E:\webpage\svn\trunk\wp-includes\default-widgets.php on line 494 PHP Notice: Undefined index: dropdown in E:\webpage\svn\trunk\wp-includes\default-widgets.php on line 495 PHP Notice: Undefined index: title in E:\webpage\svn\trunk\wp-includes\default-widgets.php on line 595 PHP Notice: Undefined index: number in E:\webpage\svn\trunk\wp-includes\default-widgets.php on line 596 PHP Notice: Undefined index: title in E:\webpage\svn\trunk\wp-includes\default-widgets.php on line 1017 PHP Notice: Undefined index: filter in E:\webpage\svn\trunk\wp-includes\default-widgets.php on line 415
No patch from me yet, sorry.
#29
@
15 years ago
When DB Cache plugin is active, WP shows following warning many times:
Notice: Undefined index: debug in C:\wordpress28.local\wp-content\db.php on line 646
I am not sure if this is a WP or plugin issue. I am using WP 2.8 beta 2.
#30
@
15 years ago
When DB Cache plugin is active, WP shows following warning many times:
Thats a issue in the DB Cache plugin, not WordPress.
Its probably got code such as this:
if ( $this->options['debug'] ) { ...
Which is wrong, Really, it should be written like this:
if ( isset($this->options['debug']) && $this->options['debug'] ) { or just if ( !empty($this->options['debug']) ) {
wp_explain_nonce() fix for custom nonces