Please update registerUserFunction

Issue #321 resolved
Former user created an issue

Please correct function registerUserFunction, to allow any number of parameters. Currently only one is allowed.

Modified function:

public function registerUserFunction($ids)
    {
        // in case a single function id was passed
        if (is_string($ids))
            $ids = array($ids);

        if ($this->type == 'PDO') {
            foreach ($ids as $id) {
                $this->db->sqliteCreateFunction($id, $id, -1);
            }
        } else { // type is Sqlite3 or SQLiteDatabase
            foreach ($ids as $id) {
                $this->db->createFunction($id, $id, -1);
            }
        }
    }

Please if someone can upload the modification is appreciated.

Comments (1)

  1. Log in to comment