Opened 14 years ago
Closed 12 years ago
#16754 closed enhancement (fixed)
PHP5-port - srand()
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.7 | Priority: | normal |
Severity: | normal | Version: | 3.1 |
Component: | Formatting | Keywords: | has-patch commit |
Focuses: | Cc: |
Attachments (3)
Change History (17)
#2
@
14 years ago
- Version changed from 3.1 to 3.3
- Removed srand()
- There's no reason to do floor(rand()) when rand() always returns an integer.
- Renamed $emailNOSPAMaddy to $email_no_spam_addy to match Coding Standards
- Replaced "$i = $i + 1" with "$i++" which is more common in WordPress
#3
@
14 years ago
- Version changed from 3.3 to 3.1
Version field indicates when the enhancement was initially suggested.
#4
@
12 years ago
- Keywords close added; has-patch removed
- Resolution set to maybelater
- Status changed from new to closed
Closing as maybe later. See: http://make.wordpress.org/core/2011/03/23/code-refactoring/
#5
@
12 years ago
- Component changed from General to Formatting
- Keywords close removed
- Milestone Awaiting Review deleted
#6
@
12 years ago
- Milestone set to 3.7
- Resolution maybelater deleted
- Status changed from closed to reopened
Actually, removing srand()
and floor()
seems valid here. It's removing obsolete and redundant code, not just a readability enhancement.
#9
@
12 years ago
- Owner set to dd32
- Resolution set to fixed
- Status changed from reopened to closed
In 25055:
#10
@
12 years ago
It's not going to affect the functionality but it does look like there's a typo in the docblock - line 1487 reads @param int $extra_entrpoy
rather than @param int $extra_entropy
#12
@
12 years ago
I'd argue that $extra_entropy
is a misleading name for the variable. 16754.diff switches to $hex_encoding
and uses array style character access instead of substr()
.
#13
@
12 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
I agree that it's not exactly a great name, and am fine with it being changed (anything was better than $mailto
)
At first, $hex_encoding
doesn't feel right, because it just randomly hex's characters, it doesn't turn it on for the entire link, but at the same time, it does what it says on the box, enables some hex encoding.
Probably this just was forgotten