mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fix the order of params
The parameters for the strpos and substr functions were wrong. strpos always failed so never triggered the substr. This would mean $fieldClass would be left with 'Varchar(255)' Fixing this had no speed or memory effect.
This commit is contained in:
parent
c877882f7e
commit
168955135b
@ -358,8 +358,8 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
|||||||
if(!is_string($fieldClass)) continue;
|
if(!is_string($fieldClass)) continue;
|
||||||
|
|
||||||
// Strip off any parameters
|
// Strip off any parameters
|
||||||
$bPos = strpos('(', $fieldClass);
|
$bPos = strpos($fieldClass, '(');
|
||||||
if($bPos !== FALSE) $fieldClass = substr(0,$bPos, $fieldClass);
|
if($bPos !== FALSE) $fieldClass = substr($fieldClass, 0, $bPos);
|
||||||
|
|
||||||
// Test to see if it implements CompositeDBField
|
// Test to see if it implements CompositeDBField
|
||||||
if(ClassInfo::classImplements($fieldClass, 'CompositeDBField')) {
|
if(ClassInfo::classImplements($fieldClass, 'CompositeDBField')) {
|
||||||
|
Loading…
Reference in New Issue
Block a user