#10758 closed defect (bug) (fixed)
Code Improvements (hakre's session)
Reported by: | hakre | Owned by: | |
---|---|---|---|
Milestone: | 2.9 | Priority: | normal |
Severity: | normal | Version: | 2.8.4 |
Component: | General | Keywords: | has-patch dev-feedback |
Focuses: | Cc: |
Description
Collection ticket for code improvements for 2.9 containing minor improvements like wrong formattings, unchecked usage of variable names, consts or inexistant array keys or object properties.
Attachments (14)
Change History (32)
#4
follow-up:
↓ 6
@
15 years ago
Shouldn't these have individual tickets, so they can have descriptive titles and the ticket can be managed effectively by committers (thinking about the commit stream, and that loading up one ticket might slow down getting commits)?
#5
@
15 years ago
- Cc webmaster@… added
why hasn't this been committed yet? I almost submitted some of these same patches, as I'm tired of having to modify these files to prevent PHP NOTICE's in my log file.
At least for the wp-trackback.php, no-brainer.
#6
in reply to:
↑ 4
@
15 years ago
- Summary changed from Code Improvements to Code Improvements (hakre's session)
Replying to janeforshort:
Shouldn't these have individual tickets, so they can have descriptive titles and the ticket can be managed effectively by committers (thinking about the commit stream, and that loading up one ticket might slow down getting commits)?
Well, the title (summary) is infact not very descriptive. This was a session I've done while monitoring an application. I'll change the title accordingly now. I think many (if not all) of the patches are commit ready but a comitter should give feedback which form is preferred (single patch, more tickets etc.).
maybe related: #10861
@
15 years ago
That global variable is not always an object of class WP_User + global and variable hints
#7
@
15 years ago
as reference for the last one:
PHP Notice: Trying to get property of non-object in /is/htdocs/wp1055410_Q291LS7NBM/www/wp-includes/pluggable.php on line 1227
(that entry is reduced, I had that multiple times on a production site)
#8
follow-up:
↓ 11
@
15 years ago
- Keywords dev-feedback added
Session is closed now. Any feedback on the patches? Should those be combined? Should I or the committer do it?
#9
@
15 years ago
There are few places that seem wrong. If some variables are not set we should be returning errors not give them default values. For example creating a nonce for user ID of 0 is not going to happen :)
#10
@
15 years ago
Yeah I thought so as well but you must think it to an end: This patch is not about solving programme-design related problem, it's only for checking. The default values chosen are those for unset variables (NULL) which is perfectly well for this patch then.
Maybe for those cases it actually makes no sense (no idea which that are, I have not designed any of those functions) additional tickets reporting those bugs should be opened and then referenced to this one.
#11
in reply to:
↑ 8
@
15 years ago
Replying to hakre:
Session is closed now. Any feedback on the patches? Should those be combined? Should I or the committer do it?
#16
in reply to:
↑ 14
@
15 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Replying to azaozz:
Skipped couple of fixes as they would need logic changes too.
Would have been great if the left-out changes could have been isolated in an additional patch. Pleases remember that an unset variable always returns the value NULL therefore no logic-changes should have appeared in the patch, at least my intention was to not change the actual workflow. Would be great to know at which places you see logic changes needed.
Will try to compile anohter patch that reflects leftout changes against current head.
So where is the patch?