From 183a425c551969d4f56b04766fca82819a2a7b15 Mon Sep 17 00:00:00 2001 From: David Rothstein Date: Mon, 12 Oct 2015 23:32:29 -0400 Subject: Issue #2508055 by Dave Reid, David_Rothstein, hussainweb: Add support for autoloading Traits --- includes/registry.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'includes/registry.inc') diff --git a/includes/registry.inc b/includes/registry.inc index 5fc767487..29a1fca8c 100644 --- a/includes/registry.inc +++ b/includes/registry.inc @@ -164,7 +164,7 @@ function _registry_parse_files($files) { * (optional) Weight of the module. */ function _registry_parse_file($filename, $contents, $module = '', $weight = 0) { - if (preg_match_all('/^\s*(?:abstract|final)?\s*(class|interface)\s+([a-zA-Z0-9_]+)/m', $contents, $matches)) { + if (preg_match_all('/^\s*(?:abstract|final)?\s*(class|interface|trait)\s+([a-zA-Z0-9_]+)/m', $contents, $matches)) { foreach ($matches[2] as $key => $name) { db_merge('registry') ->key(array( -- cgit v1.2.3