Merge pull request #8722 from lerni/fix-Warning]-on-count()-with-PHP->=-7.2

fix [Warning] on count() with PHP >= 7.2
This commit is contained in:
Robbie Averill 2019-01-11 17:59:17 +01:00 committed by GitHub
commit 1c18d9505f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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) {