• Here is a diff for corrections to make plugin work with php7 on wp 4.9.4, could you pleas add this to the plugin or add soundstrategies to contributors?

    svn diff trunk/la-petite-url.php
    Index: trunk/la-petite-url.php
    ===================================================================
    — trunk/la-petite-url.php (revision 1817155)
    +++ trunk/la-petite-url.php (working copy)
    @@ -4,7 +4,7 @@
    Plugin URI: http://lapetite.me
    Help & Support: http://getsatisfaction.com/extrafuture/products/extrafuture_la_petite_url
    Description: Personal, customized URL shortening for WordPress.
    -Version: 2.1.5
    +Version: 2.1.6
    Author: Phil Nelson
    Author URI: http://extrafuture.com

    @@ -64,6 +64,8 @@
    global $wpdb;
    global $petite_table;

    + if( empty( $the_petite ) ) return false;
    +
    $post_query = $wpdb->get_row(“SELECT * FROM “.$wpdb->prefix.”$petite_table WHERE petite_url = ‘”.$the_petite.”‘”);
    if(count($post_query) > 0)
    {
    @@ -129,11 +131,11 @@
    try {
    if($post_parent != ‘0’ && $post_parent != “”)
    {
    – $wpdb->query(“INSERT INTO “.$wpdb->prefix. $petite_table .” VALUES($post_parent,'”.mysql_real_escape_string($string).”‘)”);
    + $wpdb->query(“INSERT INTO “.$wpdb->prefix. $petite_table .” VALUES($post_parent,'”.esc_sql($string).”‘)”);
    }
    else
    {
    – $wpdb->query(“INSERT INTO “.$wpdb->prefix. $petite_table .” VALUES($post,'”.mysql_real_escape_string($string).”‘)”);
    + $wpdb->query(“INSERT INTO “.$wpdb->prefix. $petite_table .” VALUES($post,'”.esc_sql($string).”‘)”);
    }
    }
    catch(Exception $e)
    @@ -164,9 +166,8 @@
    $referer = $_SERVER[‘HTTP_REFERER’];

    + $le_petite_url_split = explode(‘/’,$the_petite);

    – $le_petite_url_split = spliti(‘/’,$the_petite);

    $le_petite_url_use = count($le_petite_url_split) – 1;

    if(le_petite_url_check_url($le_petite_url_split[$le_petite_url_use]))
    @@ -630,5 +631,3 @@
    echo “<p>This post doesn’t seem to have a petite url. To generate one, save the post. The petite url will then appear right where this message is.</p>”;
    }
    }

    -?>
    \ No newline at end of file

  • The topic ‘le-petite-url PHP 7 support and home page fix, WP 4.9.4 support’ is closed to new replies.