Home » Authentication » LiveUser » Bug #1639
Error in foreach loop
Details
| Submitted | 2004-06-14 23:44 UTC |
|---|---|
| From | worthy at home dot olsztyn dot pl |
| Assigned | arnaud |
| Status | Closed |
| Package | LiveUser |
| PHP Version | Irrelevant |
| OS | Irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2004-06-14 23:44 UTC] worthy at home dot olsztyn dot pl
Description:
------------
In file LiveUser/Admin/Auth/Containers/DB.php the foreach loop in line 191 and 311 generates a 'Invalid argument supplied ...' error when $this->authTableCols['custom'] is unset. In line 418 is correct.
Reproduce code:
---------------
line 191:
foreach ($this->authTableCols['custom'] as $alias => $field_data) {
$col[] = $field_data['name'];
$val[] = $this->dbc->quoteSmart($customFields[$alias]);
}
line 311:
foreach ($this->authTableCols['custom'] as $alias => $field_data) {
$updateValues[] = $field_data['name'] .
$this->dbc->quoteSmart($customFields[$alias]);
}
Expected result:
----------------
line 191:
if (sizeof($this->authTableCols['custom']) > 0) {
foreach ($this->authTableCols['custom'] as $alias => $field_data) {
$col[] = $field_data['name'];
$val[] = $this->dbc->quoteSmart($customFields[$alias]);
}
}
line 311:
if (sizeof($this->authTableCols['custom']) > 0) {
foreach ($this->authTableCols['custom'] as $alias => $field_data) {
$updateValues[] = $field_data['name'] .
$this->dbc->quoteSmart($customFields[$alias]);
}
}