Skip to content
Snippets Groups Projects
Commit efe859a1 authored by Jared Hancock's avatar Jared Hancock
Browse files

Allow semicolons in single quotes in schema files

parent 2832eb9f
No related branches found
No related tags found
No related merge requests found
......@@ -52,7 +52,9 @@ Class SetupWizard {
# Replace table prefix
$schema = str_replace('%TABLE_PREFIX%', $prefix, $schema);
# Split by semicolons - and cleanup
if(!($statements = array_filter(array_map('trim', @explode(';', $schema)))))
if(!($statements = array_filter(array_map('trim',
// Thanks, http://stackoverflow.com/a/3147901
preg_split("/;(?=(?:[^']*'[^']*')*[^']*$)/", $schema)))))
return $this->abort('Error parsing SQL schema', $debug);
......
/**
* @signature ec19794f1fc8d6a54ac217d6e8006a85
* @version 1.8.0
* @version 1.8.0 - HTML ticket thread
*
* Migrate to a single attachment table to allow for inline image support
* with an almost countless number of attachment tables to support what is
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment