Via:
- http://lists.automattic.com/pipermail/wp-hackers/2012-June/043295.html
- http://wordpress.org/support/topic/illegal-string-offset-total_users?replies=14#post-2893756
- https://core.trac.wordpress.org/ticket/20966
I find:
- Normally it would return an array from the cache
- Meaning the return value of get_user_count() is different than in the php doc above it
- But… if the cache does not contain it, it will return an integer leading (in my case)
to an warning (requesting an array value from a string) BUT somehow not leading to
a warning with many others (assuming they still have an array as return value, even if
it does not contain a value)
I found out that when on PHP version 5.4 or later it will throw this warning. Previous versions will not throw this warning, related, see example 2 on http://php.net/manual/en/function.empty.php
It has been taken care of in 20966
Related Posts:
- If the current user is an administrator or editor
- How do I add a field on the Users profile? For example, country, age etc
- user_login vs. user_nicename
- Groups of capabilities: users with multiple roles?
- Is there a way to merge two users?
- How to restrict access to uploaded files?
- Execute a function when admin changes the user role
- Best way to send users password?
- Why are user address fields required [closed]
- How to discover and delete unused accounts?
- Multi-steps WordPress registration : in 4 steps how to?
- Allow guests to save favourite pages?
- Basic auth WordPress REST API dilemma
- How to enable the theme editor cap for an editor role?
- WordPress keeps asking for connection information in localhost
- importing users where password is provided as md5 + much metadata
- User File Upload Repository?
- How to get user ID during registration and add it to a custom table
- How can I secure a WordPress blog using OpenID from a single provider?
- Redirect after login based on user role (custom login page)
- Can I create users that have access to *some* other users posts instead of all other users posts?
- My custom page template with is_user_logged_in() does not detect that I’m logged in
- Total Word Count For Posts And Comments By One Author
- Delete user from frontend
- Tagging users in WordPress
- Share user table from WP with Drupal
- How can I allow password reset based on logins containing the @ character?
- WordPress User getting added with id of 0
- Log all users out of all locations after 24 hours
- Register new user in the frontend
- Force logout ALL users at a certain time
- Show MD5 Password in user section
- RSS feed for a given user’s post?
- add_cap not working with Shop Manager role
- User Last Login Sort Column
- get_users() timeout on big userbase — options to divide query?
- Plugin for limiting user registration based on ip with expiry period?
- Bulk delete users from a csv list
- Using user_status in conditional with get_users to return existing users
- Split Blog Into Two Sections?
- how to update or refresh the wp user object?
- Users managed to register on website with no register button?
- Is there a way to make custom fields only editable by administrators?
- How to use WordPress for class notes?
- mysql query two database tables, users and usermeta and sort by custom meta int value
- Including users in insert link internal link search in Gutenberg
- How to Check User type from the form user registers in user_register hook?
- Should I encrypt the response that triggers an Ajax action? Is nonce sufficient?
- Editable registration date field in user profile
- Turn off password requirement
- How to duplicate a wordpress user and all his/her data from custom fields?
- How do I transfer user passwords from one WordPress site to another?
- How can I authenticate user credentials against a WordPress instance?
- Add a role and give admin priviledges
- WordPress registration without wp-login.php and wp-admin folder, is it possible?
- Use WordPress Login for a non-wordpress site
- How to change user`s avatar?
- Add Custom Filter to Admin User list
- WordPress SQL Issue not returning correct reselts
- How to get last user with wpdb?
- How to Create a User Profile Page?
- Restrict access to non-wordpress section of site with user roles?
- how to remove email field from default user registration form on wordpress
- How can I change “Users” related labels in the wordpress dashboard
- Add custom user meta data
- Does it matter if the very first user, usually Admin, does not have a user ID of 1?
- How to set default’ => $current_user->user_login
- User can manage one page accessible by everyone?
- Can i use two different user tables for on WP install?
- SELECT from wp_users, get Displayname too
- Redirect current user to their most recent custom post
- how redirect users to custom login page when “login to reply” is clicked? [duplicate]
- Making WordPress available while logged into another website
- Get user ID when action row link is clicked
- Whenever I got to my new pages (http://www.cwmags.com/news) it requests login?
- User with same Mail but a different additional info(like domain)
- current_user_can() causing critical error
- How to connect wordpress user with my own APP user?
- Author Error “Sorry, you are not allowed to access this page.”
- How to give guest users “not logged in” a role?
- How to Moderate Edits to User Profiles?
- Upon running wp_insert_user() WP Keeps Saying user_login is already in the system when it isn’t
- wp_insert_user always tries the same user name
- Limit a user only to wp-cli only use
- WordPress session times out – but doesn’t log out?
- What is the best user experience for user to perform an action using email?
- Registration page as homepage
- WordPress install checking permissions of user id 0
- How to do a search based on the user’s location & search term and return proximity-based results?
- Store extra user values permanently
- New User ID not working in custom function with user_register hook
- How to disable users changing their display_name?
- Are there any hook or filter when adding new user in WordPress?
- Creating Custom user type just like custom post
- Sort users by custom user meta value
- How can I let users open the site for other visitors?
- What techniques can a user employ to achieve a password rated “strong” in the WordPress password checker
- Email Subscribe for Downloads in WordPress
- Cant edit profile from frontend
- application password is missing