mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: Remove support for PHP <5.3.2
This commit is contained in:
parent
14c0796617
commit
fb3b03f38b
@ -264,7 +264,6 @@ abstract class DataFormatter extends Object {
|
||||
// add default required fields
|
||||
$dbFields = array_merge($dbFields, array('ID'=>'Int'));
|
||||
|
||||
// @todo Requires PHP 5.1+
|
||||
if(is_array($this->removeFields)) {
|
||||
$dbFields = array_diff_key($dbFields, array_combine($this->removeFields,$this->removeFields));
|
||||
}
|
||||
|
@ -17,8 +17,6 @@
|
||||
* Usage through URL (module-specific): http://localhost/dev/tasks/i18nTextCollectorTask/?module=mymodule
|
||||
* Usage on CLI: sake dev/tasks/i18nTextCollectorTask
|
||||
* Usage on CLI (module-specific): sake dev/tasks/i18nTextCollectorTask module=mymodule
|
||||
*
|
||||
* Requires PHP 5.1+ due to class_implements() limitations
|
||||
*
|
||||
* @author Bernat Foj Capell <bernat@silverstripe.com>
|
||||
* @author Ingo Schommer <FIRSTNAME@silverstripe.com>
|
||||
|
@ -2158,10 +2158,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
||||
* @return bool
|
||||
*/
|
||||
public static function has_own_table($dataClass) {
|
||||
|
||||
// The condition below has the same effect as !is_subclass_of($dataClass,'DataObject'),
|
||||
// which causes PHP < 5.3 to segfault in rare circumstances, see PHP bug #46753
|
||||
if($dataClass == 'DataObject' || !in_array('DataObject', ClassInfo::ancestry($dataClass))) return false;
|
||||
if(!is_subclass_of($dataClass,'DataObject')) return false;
|
||||
|
||||
if(!isset(DataObject::$cache_has_own_table[$dataClass])) {
|
||||
if(get_parent_class($dataClass) == 'DataObject') {
|
||||
|
Loading…
Reference in New Issue
Block a user