In PHP 7.2 and later you will get a warning if you call count() on null. So either initialize $errors to an empty array here, or use empty() to check it as I have done here.
* avoid scaring users for a minor issue
* convert the warning message into a simple info
* simplify algorithm for detection and only search on relevant pages (batch manager + sync page)
This fix was initially only for branch 2.9, and branch master should have
received a new version of jshrink, but I forgot to do it before 2.10 and now
we have a regression in 2.10. This commit will be cherry-picked to 2.10 and
we also have it on master so that we don't have a new regression in 2.11 (in
case jshrink is not properly updated)
* for the name of the file in buffer directory, do not use the name given by the user, but the md5 of the name without extension
* function add_uploaded_file deletes uploaded file if not expected
This time, we do it right before sending the query to MySQL, in the pwg_query
function. This is not optimal, because we add extra processing, useless most
of the time. This solution has less impact on code, and automatically work for
all core and plugins SQL queries.
When loading a user's theme, make sure it's installed. Also, when
determining the default theme, account for the situation in which
zero themes are installed (and use 'default' then).
Refs #1061
which are single_insert, single_update, mass_inserts and mass_updates. The new function
protect_column_name simply surrounds the name with backticks, if needed.
* rename methods to pwg.users.favorites.getList + pwg.users.favorites.add + pwg.users.favorites.remove (better for alpha ordered listing)
* simplify method ws_users_favorites_getList to only work with current user
* use the new option "ignore" on single_insert
Using SmartPocket theme in Android 9's Chrome gives this error:
"Uncaught TypeError: Cannot read property 'toString' of null"
The error is caused by the following code
e.navigator.userAgent.match(/Android (\d+.\d+)/)
because the userAgent set by Chrome in Android 9 reads:
"Mozilla/5.0 (Linux; Android 9; H4133) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.101 Mobile Safari/537.36"
Signed-off-by: Wei-Chung Wen <morisato3711@gmail.com>