Bug #3052
closed
replacePrefix not working properly in some cases
Added by krileon almost 13 years ago.
Updated almost 13 years ago.
Start date:
30 November 2011
Description
When using getTableStatus or getTableList it's failing to replace the prefix resulting in #__ instead of the prefix being sent with the query. This causes getTableStatus for example to return nothing. Confirmed by GJ 2.4 as it causes the check for GJ 1.8 database tables to always fail.
Files
Was able to confirm is due to the regex expecting something before the string. However, both those functions just pass the tablename and nothing else so the regex fails.
This was only a problem when the beginning of $pattern started with #__, which is the case for getTableStatus. As there is nothing to lookbehind the regex fails. The proposed fix adds an OR case to see if the beginning of the string starts with #__ resolving the issue. Fix does not appear to have any adverse affects and confirmed it resolves GJs table check issue.
Committed as proposed in r1658 .
- Status changed from Resolved to Closed
- Target version set to CB 1.8
- Estimated time set to 2:00 h
Also available in: Atom
PDF