When you search system preferences errors are generated in the log: preferences.pl: Use of uninitialized value in pattern match (m//) at /admin/preferences.pl line 219. preferences.pl: Use of uninitialized value $text in pattern match (m//) at /admin/preferences.pl line 252. preferences.pl: Use of uninitialized value $text in pattern match (m//) at /admin/preferences.pl line 252. preferences.pl: Use of uninitialized value $text in pattern match (m//) at /admin/preferences.pl line 252. preferences.pl: Use of uninitialized value in pattern match (m//) at /admin/preferences.pl line 219. preferences.pl: Use of uninitialized value $text in pattern match (m//) at /admin/preferences.pl line 252. preferences.pl: Use of uninitialized value $text in pattern match (m//) at /admin/preferences.pl line 252. preferences.pl: Use of uninitialized value $text in pattern match (m//) at /admin/preferences.pl line 252.
Created attachment 6638 [details] [review] Proposed fix Adding a check for an empty value in a couple of places which seem to always get one. As far as I can tell these places in the script are looping over ALL the data in the pref files, and sometimes an empty value comes through. I wonder if this is because of a minor syntax error in the pref file? My correction is a stab in the dark since I haven't determined where the empty value is actually coming from. This change quiets the errors in the log and doesn't seem to affect preference search results.
Created attachment 6680 [details] [review] Bug 7330 - System preferences editor generates errors in the log with each search Adding a check for an empty value in a couple of places which seem to always get one. As far as I can tell these places in the script are looping over ALL the data in the pref files, and sometimes an empty value comes through. I wonder if this is because of a minor syntax error in the pref file? My correction is a stab in the dark since I haven't determined where the empty value is actually coming from. This change quiets the errors in the log and doesn't seem to affect preference search results. Signed-off-by: Liz Rea <wizzyrea@gmail.com> No more messages in the logs. Yay! Ran unit tests on this (t, xt/author, xt, t/db_dependent)- nothing out of the ordinary in any.
QA comment: well I feel I shouldn't accept a patch that says "fixes the problem, but I don't know why"... OTH, preferences.pl is poorly documented, it fixes the problem, and I couldn't find any side effect. I couldn't understand why those empty values are here though. So: passed QA patch pushed, please test chris_n = I would wisely say "don't push this on 3.6. If there is a side effect we couldn't detect, we can hope someone else will spot it in the next 4 months before 3.8 is released"