fix [Warning] on count() with PHP >= 7.2

This commit is contained in:
lerni 2019-01-11 17:22:58 +01:00
parent e9b23d45a7
commit 16a837d6a0

View File

@ -446,7 +446,7 @@ class Versioned extends DataExtension implements TemplateGlobalProvider {
// Build a list of suffixes whose tables need versioning
$allSuffixes = array();
$versionableExtensions = $this->owner->config()->versionableExtensions;
$versionableExtensions = (array)$this->owner->config()->versionableExtensions;
if(count($versionableExtensions)){
foreach ($versionableExtensions as $versionableExtension => $suffixes) {
@ -936,7 +936,7 @@ class Versioned extends DataExtension implements TemplateGlobalProvider {
* @return string
*/
public function extendWithSuffix($table) {
$versionableExtensions = $this->owner->config()->versionableExtensions;
$versionableExtensions = (array)$this->owner->config()->versionableExtensions;
if(count($versionableExtensions)){
foreach ($versionableExtensions as $versionableExtension => $suffixes) {