diff --git a/tools/raml2html/composer.json b/tools/raml2html/composer.json
index 9043911a78..adc9a1f5b3 100644
--- a/tools/raml2html/composer.json
+++ b/tools/raml2html/composer.json
@@ -15,7 +15,7 @@
}
],
"require": {
- "php": "^7.2",
+ "php": "^7.4",
"symfony/console": "^4.2",
"raml-org/raml-php-parser": "dev-master",
"twig/twig": "^2.0",
diff --git a/tools/raml2html/src/Twig/Extension/RenderExtension.php b/tools/raml2html/src/Twig/Extension/RenderExtension.php
index 264962a415..b64eace71a 100644
--- a/tools/raml2html/src/Twig/Extension/RenderExtension.php
+++ b/tools/raml2html/src/Twig/Extension/RenderExtension.php
@@ -68,8 +68,7 @@ public function getExamplesTabs(array $responseBodies): array
/** @var \Raml\Body $body */
foreach ($responseBodies as $body) {
-
- if (!empty($body->getExample())) {
+ if (!empty($body->getExamples()) && !empty($body->getExample())) {
$tabs[] = $this->getSchemaFormat($body->getMediaType());
}
}
@@ -85,7 +84,7 @@ public function getExamplesBody(array $responseBodies): array
foreach ($responseBodies as $body) {
$schemaFormat = $this->getSchemaFormat($body->getMediaType());
- if (!empty($body->getExample())) {
+ if (!empty($body->getExamples()) && !empty($body->getExample())) {
$examples[$schemaFormat][] = $body->getExample();
}
}