Opened 4 years ago
Closed 4 years ago
#9393 closed defect (bug) (fixed)
PHP notices for WordPress 2.8
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | lowest | Milestone: | 2.8 |
| Component: | Warnings/Notices | Version: | 2.8 |
| Severity: | minor | Keywords: | has-patch tested commit |
| Cc: | matt@… |
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)
Viper007Bond — 4 years ago
comment:1
markjaquith — 4 years ago
comment:2
Viper007Bond — 4 years ago
Don't commit 9393_theme-install.patch. It's deprecated as I didn't see #9508.
I included a fix for a notice (Undefined index: metakeyselect in admin-ajax.php) in #7541.
Notice fix for media upload. check if WP_ADMIN is defined before trying to define it.
Update to 9393-media-fixes.diff. More notice fixes found through the media area.
Only check for unique user_nicename when updating since a user_id hasn't been created for a new user yet
Patches still waiting:
9393-plugin-editor.diff
9393-registration.diff
9393-wp_handle_upload.diff
- Component changed from General to Warnings/Notices
- Owner anonymous deleted
nbachiyski — 4 years ago
Deleting a widget, which is beng used generates non-existing array key notices
nbachiyski — 4 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.
comment:8
nbachiyski — 4 years ago
Two more tiny notice patches.
- 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
comment:10
mrmist — 4 years ago
Added patch for wp-admin\includes\template.php fixes notice for author ID function.
comment:11
sivel — 4 years ago
- Keywords commit added
comment:12
westi — 4 years ago
comment:13
westi — 4 years ago
comment:14
westi — 4 years ago
comment:15
westi — 4 years ago
comment:16
westi — 4 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.
comment:17
sivel — 4 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.
comment:18
mrmist — 4 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.
Replaces template.diff as this fixes the notice in 2 locations where as the other missed one
comment:19
sivel — 4 years ago
Apologies on the file extension for that last one. I don't know what I was thinking.
comment:20
automattor — 4 years ago
comment:21
mrmist — 4 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.
comment:22
ryan — 4 years ago
This patch replaces post_template.patch. Replaces get_author_name in all locations in which it is used
comment:23
sivel — 4 years ago
Accidental attachment of incorrect patch. Ignore the previous attachment.
This patch replaces post_template.patch. Replaces get_author_name in all locations in which it is used
comment:24
westi — 4 years ago
comment:25
follow-up:
↓ 26
Viper007Bond — 4 years ago
current_theme_info() is still throwing notices.
comment:26
in reply to:
↑ 25
scribu — 4 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
Last round of replacements for deprecated get_the_author_* and the_author_* functions.
comment:27
ryan — 4 years ago
comment:28
follow-up:
↓ 31
mrmist — 4 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.
comment:29
sirzooro — 4 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.
comment:30
dd32 — 4 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']) ) {
comment:31
in reply to:
↑ 28
Denis-de-Bernardy — 4 years ago
- Resolution set to fixed
- Status changed from new to closed
see #10025

wp_explain_nonce() fix for custom nonces