Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

[Warning] preg_match(): Compilation failed: unrecognized character after (?< at offset 3


Go to End


973 Views

Avatar
robskinn

Community Member, 12 Posts

17 October 2015 at 12:05am

Hi I'm getting this error after fixing a problem I was having with the ShortcodeParser.php which related to an out-of-date version of PCRE - Perl Compatible Regular Expressions. Any idea?
Rob

[Warning] preg_match(): Compilation failed: unrecognized character after (?< at offset 3
GET /sawtrust/dev/build?flush=1&flushtoken=cd79a4a5740ae3ad8a9a91481d67b954
Line 479 in /home/linweb14/s/sawtrust.org-1061145573/user/htdocs/sawtrust/framework/model/connect/DBSchemaManager.php

470 	 * Given an index spec determines the index type
471 	 *
472 	 * @param array|string $spec
473 	 * @return string
474 	 */
475 	protected function determineIndexType($spec) {
476 		// check array spec
477 		if(is_array($spec) && isset($spec['type'])) {
478 			return $spec['type'];
479 		} elseif (!is_array($spec) && preg_match('/(?<type>\w+)\s*\(/', $spec, $matchType)) {
480 			return strtolower($matchType['type']);
481 		} else {
482 			return 'index';
483 		}
484 	}
485