Closed (works as designed)
Project:
Drupal Code Sniffer
Version:
7.x-1.0-alpha1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Apr 2012 at 05:01 UTC
Updated:
10 Apr 2012 at 04:26 UTC
According to _registry_parse_file (http://api.drupal.org/api/drupal/includes%21registry.inc/function/_regis...), specifically the following line:
if (preg_match_all('/^\s*(?:abstract|final)?\s*(class|interface)\s+([a-zA-Z0-9_]+)/m', $contents, $matches)) {
Classes are not stored in the registry if they use the upper case C as in "Class". This causes drupal_autoload_class to fail to find the correct include and thus there are situations where a class definition is never loaded.
In addition, PHP documentation all appears to encourage the lower case "class" in it's examples.
Comments
Comment #1
ericduran commented@carn1x you should use a lower case "c" in "class". This error is talking about your class name, not the actual class string.
Comment #2
carn1x commentedDerp! Thanks for setting me straight :)