[wp-trac] [WordPress Trac] #41506: wpdb::get_table_from_query - Regexp recurssion regression

WordPress Trac noreply at wordpress.org
Thu Nov 2 05:06:12 UTC 2017


#41506: wpdb::get_table_from_query - Regexp recurssion regression
-------------------------------+-------------------------
 Reporter:  stephenlane92      |       Owner:
     Type:  defect (bug)       |      Status:  closed
 Priority:  normal             |   Milestone:
Component:  Database           |     Version:  4.7
 Severity:  normal             |  Resolution:  worksforme
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+-------------------------
Changes (by dd32):

 * keywords:   => reporter-feedback
 * status:  new => closed
 * resolution:   => worksforme
 * severity:  blocker => normal
 * milestone:  Awaiting Review =>


Comment:

 Hi @stephenlane92 and welcome to Trac.

 Sorry for not receiving any response here for so long.
 For historical reference purposes, the fatal error in 4.7.5 was triggering
 on [https://core.trac.wordpress.org/browser/tags/4.7.5/src/wp-includes/wp-
 db.php?marks=3030#L3020 wpdb::get_table_from_query()] specifically this
 line:
 {{{
 // Strip everything between parentheses except nested selects.
 $query = preg_replace( '/\((?!\s*select)[^(]*?\)/is', '()', $query );
 }}}

 Are you still experiencing the issue at all? Did you find a solution on
 your own?

 It sounds like a plugin is running a query which is long enough to run
 into PCRE limitations.
 Unfortunately without an example query of what's triggering it, it's a bit
 hard for WordPress to do anything further here.

 The recursion limit of PCRE is controlled by the `pcre.recursion_limit`
 php.ini setting, if you could respond with the value of that, and a query
 which triggers the issue, we can look into it further.

 For now, I'm marking this as `worksforme` purely as there's been no other
 reports in the time since it's been added, and in testing with
 `pcre.recursion_limit` at its' default value of `10000` I'm not able to
 reproduce any issues (even with lowering it to `1`). If you can respond
 with extra details, you can re-open the ticket and we'll look into it.

 Thanks!

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41506#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list