mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
fix [Warning] on count() with PHP >= 7.2
This commit is contained in:
parent
e9b23d45a7
commit
16a837d6a0
@ -446,7 +446,7 @@ class Versioned extends DataExtension implements TemplateGlobalProvider {
|
|||||||
|
|
||||||
// Build a list of suffixes whose tables need versioning
|
// Build a list of suffixes whose tables need versioning
|
||||||
$allSuffixes = array();
|
$allSuffixes = array();
|
||||||
$versionableExtensions = $this->owner->config()->versionableExtensions;
|
$versionableExtensions = (array)$this->owner->config()->versionableExtensions;
|
||||||
if(count($versionableExtensions)){
|
if(count($versionableExtensions)){
|
||||||
|
|
||||||
foreach ($versionableExtensions as $versionableExtension => $suffixes) {
|
foreach ($versionableExtensions as $versionableExtension => $suffixes) {
|
||||||
@ -936,7 +936,7 @@ class Versioned extends DataExtension implements TemplateGlobalProvider {
|
|||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function extendWithSuffix($table) {
|
public function extendWithSuffix($table) {
|
||||||
$versionableExtensions = $this->owner->config()->versionableExtensions;
|
$versionableExtensions = (array)$this->owner->config()->versionableExtensions;
|
||||||
|
|
||||||
if(count($versionableExtensions)){
|
if(count($versionableExtensions)){
|
||||||
foreach ($versionableExtensions as $versionableExtension => $suffixes) {
|
foreach ($versionableExtensions as $versionableExtension => $suffixes) {
|
||||||
|
Loading…
Reference in New Issue
Block a user