• Resolved jeremyjjmail

    (@jeremyjjmail)


    On a friend’s site, email-address-encoder has just started giving a division by zero error message in email-address-encoder.php on line 172. I can’t give you a link because the plugin has been disabled so her guests aren’t presented with the error message.

    Looking at your code, it is behaving as though an empty string has been passed to eae_encode_str() but haven’t seen any obvious reason why that would happen.

    As far as I can tell there is nothing that she is likely to have done to have triggered any change – WP, theme and plugins are all up to date.

    I have admin access so could re-enable the plugin for a short time if it helps, or check anything else you might need to get this resolved.

    I think, although I can’t be sure, that this error appears on all posts/pages with email addresses.

    The error appears in various browsers. The server is an Ionos hosted server, with manually installed WP. I don’t think I have access to check anything on the server side myself, but can ask the owner.

    Thanks

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Till Krüss

    (@tillkruess)

    Hi! What plugin version is your friend using?

    Thread Starter jeremyjjmail

    (@jeremyjjmail)

    It is version 1.0.22

    Plugin Author Till Krüss

    (@tillkruess)

    Odd, can you post the full error message with file and line number?

    Thread Starter jeremyjjmail

    (@jeremyjjmail)

    I don’t seem to be able to post a screenshot, but the message is:
    Warning: Division by zero in …/htdocs/wp-content/plugins/email-address-encoder/email-address-encoder.php on line 177

    And repeated again – I assume there are two email addresses on the page.

    I omitted the start of the path before /htdocs/wp-content asI didnt think that needs to be exposed.

    Plugin Author Till Krüss

    (@tillkruess)

    How odd. What the exact URL of the page that creates the error? I’ll copy the HTML and try to reproduce this.

    • This reply was modified 2 years, 6 months ago by Till Krüss.
    Thread Starter jeremyjjmail

    (@jeremyjjmail)

    It’s https://stampoutthebox.co.uk/ – the home page and any other page with email addresses show the error.

    Thread Starter jeremyjjmail

    (@jeremyjjmail)

    I should have said:

    It’s https://stampoutthebox.co.uk/ – the home page and any other page with email addresses show the error IF the plugin is active.

    Plugin Author Till Krüss

    (@tillkruess)

    It looks like you’re using the encode shortcode where it’s not necessary.

    
    <a href="mailto:[encode]sarah@example.co.uk[/encode]" target="_blank" rel="noreferrer noopener">sarah@example.co.uk</a>
    

    Try using just a regular mailto link.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Division by zero error’ is closed to new replies.