From d6e9c4ec095a133443994946f54e2ba03408be12 Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Fri, 21 Sep 2018 13:08:11 +0200 Subject: [PATCH] Fix const not allowed in abstract class for PHP 5.3 --- h5p-metadata.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/h5p-metadata.class.php b/h5p-metadata.class.php index 29312fc..9fb5686 100644 --- a/h5p-metadata.class.php +++ b/h5p-metadata.class.php @@ -4,7 +4,7 @@ */ abstract class H5PMetadata { - const FIELDS = array( + private static $fields = array( 'title' => array( 'type' => 'text', 'maxLength' => 255 @@ -79,7 +79,7 @@ abstract class H5PMetadata { $metadata = (array) $metadata; } - foreach (self::FIELDS as $key => $config) { + foreach (self::$fields as $key => $config) { if ($key === 'title' && !$include_title) { continue;