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
|
// add default required fields
|
||||||
$dbFields = array_merge($dbFields, array('ID'=>'Int'));
|
$dbFields = array_merge($dbFields, array('ID'=>'Int'));
|
||||||
|
|
||||||
// @todo Requires PHP 5.1+
|
|
||||||
if(is_array($this->removeFields)) {
|
if(is_array($this->removeFields)) {
|
||||||
$dbFields = array_diff_key($dbFields, array_combine($this->removeFields,$this->removeFields));
|
$dbFields = array_diff_key($dbFields, array_combine($this->removeFields,$this->removeFields));
|
||||||
}
|
}
|
||||||
|
@ -18,8 +18,6 @@
|
|||||||
* Usage on CLI: sake dev/tasks/i18nTextCollectorTask
|
* Usage on CLI: sake dev/tasks/i18nTextCollectorTask
|
||||||
* Usage on CLI (module-specific): sake dev/tasks/i18nTextCollectorTask module=mymodule
|
* 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 Bernat Foj Capell <bernat@silverstripe.com>
|
||||||
* @author Ingo Schommer <FIRSTNAME@silverstripe.com>
|
* @author Ingo Schommer <FIRSTNAME@silverstripe.com>
|
||||||
* @package framework
|
* @package framework
|
||||||
|
@ -2158,10 +2158,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
|||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public static function has_own_table($dataClass) {
|
public static function has_own_table($dataClass) {
|
||||||
|
if(!is_subclass_of($dataClass,'DataObject')) return false;
|
||||||
// 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(!isset(DataObject::$cache_has_own_table[$dataClass])) {
|
if(!isset(DataObject::$cache_has_own_table[$dataClass])) {
|
||||||
if(get_parent_class($dataClass) == 'DataObject') {
|
if(get_parent_class($dataClass) == 'DataObject') {
|
||||||
|
Loading…
Reference in New Issue
Block a user