mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Replaced ManifestBuilder::has_been_included() with SS_ClassLoader::hasManifest().
This commit is contained in:
parent
2365bfc652
commit
a15b6941a6
@ -34,6 +34,13 @@ class SS_ClassLoader {
|
||||
public function getManifest() {
|
||||
return $this->manifests[count($this->manifests) - 1];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this class loader has a manifest.
|
||||
*/
|
||||
public function hasManifest() {
|
||||
return (bool)$this->manifests;
|
||||
}
|
||||
|
||||
/**
|
||||
* Pushes a class manifest instance onto the top of the stack. This will
|
||||
|
@ -76,7 +76,7 @@ class DataQuery {
|
||||
|
||||
// Error checking
|
||||
if(!$tableClasses) {
|
||||
if(!ManifestBuilder::has_been_included()) {
|
||||
if(!SS_ClassLoader::instance()->hasManifest()) {
|
||||
user_error("DataObjects have been requested before the manifest is loaded. Please ensure you are not querying the database in _config.php.", E_USER_ERROR);
|
||||
} else {
|
||||
user_error("DataObject::buildSQL: Can't find data classes (classes linked to tables) for $this->dataClass. Please ensure you run dev/build after creating a new DataObject.", E_USER_ERROR);
|
||||
|
Loading…
Reference in New Issue
Block a user