db_create_set_function - parsing bug
| Project: | phpAlbum.net |
| Version: | 0.4.1-14 |
| Component: | Code |
| Category: | bug |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | new |
Took me 6 hrs to find this.... :-)
1) If you have a group that happens to be named a php reserved word
2) You have nested folders in /photo
3) You attempt to change the group permissions in the parent folder
db_create_set_function creates a parsing error because the second index- the "group name" (which in this case is the labeled the reserved word is not encased in quotes.
Here is an extract of the code generated:
if($data["inh_groups"][guest]==1002){unset($data["inh_groups"][guest]);}if($data["inh_groups"][superuser]==1002){unset($data["inh_groups"][superuser]);}if($data["inh_groups"][Friends]==1002){unset($data["inh_groups"][Friends]);}if($data["inh_groups"][Family]==1002){unset($data["inh_groups"][Family]);}if($data["inh_groups"][NoAccess]==1002){unset($data["inh_groups"][NoAccess]);}if(!isset($data["inh_groups"][default])){$data["inh_groups"][default]=1002;};array_walk($data,'db_remove_uvodzovky_slash');
Please note: $data["inh_groups"][default] --> :-)
"default" was the name of my group.
the parsing error is "unexpected ']'"
:) - Your welcome

Recent comments
13 hours 15 min ago
17 hours 28 min ago
1 day 6 hours ago
1 day 14 hours ago
1 day 15 hours ago
10 weeks 6 days ago
11 weeks 2 hours ago
11 weeks 4 hours ago
11 weeks 15 hours ago
35 weeks 2 days ago