Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2007
    Posts
    248
    Plugin Contributions
    6

    Default [Not a bug] includes/functions_general.php typo?

    in the includes/functions_general.php

    Code:
    /**
     * Alias to $db->prepareInput() for sanitizing db inserts
     * @param string $string
     * @return string
     */
      function zen_db_input($string) {
        global $db;
        return $db->prepareInput($string);
      }
    should be

    Code:
    return $db->prepare_input($string);
    ??

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,472
    Plugin Contributions
    88

    Default Re: includes/functions_general.php typo?

    The prepareInput method is a synonym for the prepare_input method, so they're identical.

  3. #3
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: includes/functions_general.php typo?

    I can't seem to find a conversation I had regarding this "difference". Both $db->prepareInput and $db->prepare_input are valid methods recognized in the query_factory class. The first references the second.

    Question may be, what prompted identification of this as in what issue(s) are caused by the current usage? Also, if changed here, wouldn't it need to be changed everywhere it is used?

    I wish I could find that conversation as there seemed to be a valid enough reason for it to remain. I tried to search GitHub issues and PRs to find that conversation as I thought I had it where it would likely remain more "permanent" with the code. My search was individually on both prepareinput and prepare_input on closed and open issues and PRs.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Replies: 0
    Last Post: 20 Feb 2012, 07:09 PM
  2. [Not a bug] typo in sessions.php?
    By paulm in forum Bug Reports
    Replies: 2
    Last Post: 11 Sep 2011, 02:04 PM
  3. [Done v1.3.7] typo in includes english.php
    By shelbydog in forum Bug Reports
    Replies: 3
    Last Post: 3 Dec 2006, 09:00 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR