Opened 14 years ago
Closed 14 years ago
#14783 closed enhancement (fixed)
Incorrect/missing PHPDoc
Reported by: | duck_ | Owned by: | |
---|---|---|---|
Milestone: | 3.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Inline Docs | Keywords: | ongoing-project |
Focuses: | Cc: |
Description
Inspired by the 3.org API reference and the spit and polish nature of 3.1 this ticket is for patches addressing problems with current PHPDoc, e.g. spelling/factual corrections and writing missing docs.
Also, testing some methods for easily getting information for docs (e.g. version of introduction).
Attachments (6)
Change History (21)
#1
follow-up:
↓ 2
@
14 years ago
Note in 14783.001.diff there is the removal of the default array() for the $postarr parameter in wp_insert_post. This strikes me (also discussed briefly with nacin) as very odd since leaving out $postarr makes wp_insert_post useless and it will always return 0.
#2
in reply to:
↑ 1
@
14 years ago
Replying to duck_:
This strikes me (also discussed briefly with nacin) as very odd since leaving out $postarr makes wp_insert_post useless and it will always return 0.
In wp-admin/includes/post.php
:
543 $post_ID = wp_insert_post( $_POST );
There is no check within that function (wp_write_post()
) that the $_POST
array is populated.
#4
@
14 years ago
The point of inline documentation and its fixes is to not introduce possible bugs. This enables them to be committed quickly and without testing.
#6
in reply to:
↑ 5
@
14 years ago
Replying to nacin:
(In [15564]) phpdoc, @since, whitespace. Also require an argument in wp_insert_post(). props duck_, see #14783.
If that is the case, then the bug is somewhere else in the code and you are just covering up the cause.
While it is true that probably no where in the code will this function be called without passing at least something in the $postarr variable, it is made at the very least to stand as a feature for someone who wants to create a post and then fill it at some later time. There are a few cases where you'll want to fill in some data and then go back and fill in the rest once you know more.
Furthermore, this change should be in its own ticket to further track its progress and any other information that might be needed.
#10
@
14 years ago
- Keywords ongoing-project added
Anyone planning to add more to this one should do so by November 1st to get in before freeze.
Alot of @since unkown