Closed (outdated)
Project:
Sudo
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Apr 2012 at 00:16 UTC
Updated:
7 Nov 2017 at 18:31 UTC
Jump to comment: Most recent
The logic to determine whether to subvert the display of the "sudo" button uses is_array to test $sudo_roles, which presumably used to be FALSE when there were no sudo roles available, but which now returns array() in such a case. This patch corrects the problem by replacing is_array() with !empty(); however, there is a php oddity in that variable assignment is allowed within is_array(), but it is disallowed within a call to empty(). This patch therefore needed to increase the verbosity of the existing code slightly. The form chosen was selected to minimize the size of the resulting diff; a nested-if structure might be more pleasing for the final result.
| Comment | File | Size | Author |
|---|---|---|---|
| sudo-button.patch | 759 bytes | greg.1.anderson |
Comments
Comment #1
dnotes commentedClosing 6.x issues.