WordPress.org

Ready to get started?Download WordPress

Forums

Simple Real Estate Pack
[resolved] Deprecated functions for PHP 5.3 (4 posts)

  1. designwrench
    Member
    Posted 1 year ago #

    When clicking on the Amortization Schedule at the bottom of the additional information section of the Mortgage Calculator widget, the following code comes up before the amortization tables:

    Deprecated: Function ereg_replace() is deprecated in /home/angelacarlson/angela/wp-content/plugins/simple-real-estate-pack-4/includes/srp-AmmortResult.php on line 82

    Deprecated: Function eregi_replace() is deprecated in /home/angelacarlson/angela/wp-content/plugins/simple-real-estate-pack-4/includes/srp-AmmortResult.php on line 83

    Deprecated: Function eregi_replace() is deprecated in /home/angelacarlson/angela/wp-content/plugins/simple-real-estate-pack-4/includes/srp-AmmortResult.php on line 84

    Deprecated: Function eregi_replace() is deprecated in /home/angelacarlson/angela/wp-content/plugins/simple-real-estate-pack-4/includes/srp-AmmortResult.php on line 85

    I've read info on how to fix this:
    http://www.devthought.com/2009/06/09/fix-ereg-is-deprecated-errors-in-php-53/

    But honestly, I'm not a coder so I hesitate to modify anything myself.

    Advice?

    http://wordpress.org/extend/plugins/simple-real-estate-pack-4/

  2. Max Chirkov
    Member
    Plugin Author

    Posted 1 year ago #

    Replace the code on lines 82-85:

    $sale_price              = ereg_replace( "[^0-9.]", "", $sale_price);
    $annual_interest_percent = eregi_replace("[^0-9.]", "", $annual_interest_percent);
    $year_term               = eregi_replace("[^0-9.]", "", $year_term);
    $down_percent            = eregi_replace("[^0-9.]", "", $down_percent);

    with the following:

    $sale_price              = preg_replace("/[^0-9.]/", "", $sale_price);
    $annual_interest_percent = preg_replace("/[^0-9.]/i", "", $annual_interest_percent);
    $year_term               = preg_replace("/[^0-9.]/i", "", $year_term);
    $down_percent            = preg_replace("/[^0-9.]/i", "", $down_percent);

    This should work.

  3. kelley_rao
    Member
    Posted 1 year ago #

    Hi Max,

    Forgive me, but what file are we editing (in what folder). I have this same issue with an install today of your wonderful plugin.

    Kindest,
    Kelley

  4. kelley_rao
    Member
    Posted 1 year ago #

    For others: /includes/srp-AmmortResult.php

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic