WordPress.org

Ready to get started?Download WordPress

Forums

WP Login Alerts by DigiP
[resolved] Code error? (4 posts)

  1. gcaleval
    Member
    Posted 1 year ago #

    The new version is throwing PHP warnings

    charset0' not supported, assuming iso-8859-1`

    on occurrences of

    | ENT_HTML401,UTF-8

    I believe the UTF-8 needs to be in quotes:

    | ENT_HTML401,"UTF-8"

    Making that edit eliminated the warnings.

    Possibly unique to my system for some reason, but thought to share it here in the event it is useful.

    http://wordpress.org/extend/plugins/wp-login-alerts/

  2. DigiP
    Member
    Plugin Author

    Posted 1 year ago #

    I see that. Weird, that yours gives you issues. I have it installed without the quotes on my site and it worked fine, but I guess maybe your default wordpress settings are not UTF-8? I added the quotes around it though on the lines using htmlentities, and pushed the changes. Hopefully that fixes the problem. I for whatever reason, was not able to reproduce the issue on my own site however, but mine seems to work both ways, with, and without the quotes. I wonder if its a PHP issue, or a WordPress based issue though in the parsing. Thank you for posting this though and sorry for the trouble.

  3. gcaleval
    Member
    Posted 1 year ago #

    I guess maybe your default wordpress settings are not UTF-8?

    Nope it's set to UTF-8.

    I tracked it down simply by searching on pieces of the warning string, which eventually got me to the online PHP manual at php.net. There all the examples included the quotes -- I tried it and it worked. So I think we can be comfortable it is a PHP thing, not a WP one.

    The fact that it doesn't show the warnings on your setup may have to do with your PHP config. Often it is set to suppress warnings, because they are not strictly "errors" in PHP lingo and it is common to ignore them. While I do have my install configured to suppress *display* of warnings, I set it to write them to a log file.

    Full disclosure: I kept the small tweaks I made to your code that are really personal taste, not functionality, but then stopped using the plugin as I've locked wp-login.php down to be accessible from a single IP address. Which really obviates the need for brute force prevention and login notification. I still like to take related plugins for a test drive and if I can be helpful, I'll try <smile>.

    Thank you for contributing your work to the community, and best wishes for a great season!

  4. DigiP
    Member
    Plugin Author

    Posted 1 year ago #

    Yeah, I have mine locked too, so only my IP can reach wp-login.php on one of my sites, but I still use the plug-in anyway. Never know if someone manages to get a hold of or mess with htaccess via third party plugin or theme hack, but didn't take notice of the login alerts plugin. Call me paranoid, but I take no chances.

    Thanks for the post and help though. Not sure why my site never threw the error, but as mentioned, possible the server config suppresses the error.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.