Opened 12 years ago
Closed 12 years ago
#28872 closed defect (bug) (fixed)
Remove unused $check_urls and $description variables from wp-admin/includes/dashboard.php
| Reported by: | michalzuber | Owned by: | wonderboymusic |
|---|---|---|---|
| Priority: | low | Milestone: | 4.0 |
| Component: | Administration | Version: | 3.9 |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: |
Description
Variable $check_urls is passed by function param and the redefined version of it on line 833 isn't used.
URLs passed to the callback are from the function param $args = array_slice( func_get_args(), 2 );
The $description variable on line 1096 is not used afterwards.
Attachments (3)
Change History (11)
#2
@
12 years ago
- Keywords needs-patch added
- Milestone Awaiting Review → 4.0
- Priority normal → low
Variable
$check_urls
So func_get_args() ignores empty arguments and returns a copy of the passed arguments, means you can't override it. Has it ever worked?
#4
@
12 years ago
$func = function ( $one, $two, $three = array() ) {
$three = 3;
print_r( func_get_args() );
};
$func( 1, 2 );
Results in:
Array
(
[0] => 1
[1] => 2
)
This never worked - that dashboard code is beyond bizarre
#6
@
12 years ago
@ocean90 what's wrong with 28872.2.diff ?
Isn't it a bit cleaner without array slicing and shifting? If I'm missing something, I apologize.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 29130: