Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the question mark problem #40

Closed
parsibox opened this issue Oct 21, 2021 · 0 comments
Closed

the question mark problem #40

parsibox opened this issue Oct 21, 2021 · 0 comments

Comments

@parsibox
Copy link

parsibox commented Oct 21, 2021

hi
when we save a value that have question mark “?” it will be changed to “:pdooci_m0”
for example :
https://www.google.com/search?q=php ===> https://www.google.com/search:pdooci_m0q=php

problem is in this function , please fix this

   /**
     * Convert a query to use bind marks
     *
     * @param string $query to insert bind marks
     *
     * @return string query with bind marks
     */
    public static function insertMarks($query)
    {
        $pos   = -1;
        $regex = '/(?<!\')\?(?!\')/';
        return preg_replace_callback($regex, function($matches) use (&$pos) { $pos++; return ":pdooci_m$pos"; }, $query);
    }
@taq taq closed this as completed Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants