diff --git a/app/Services/DirectonHtmlBuilder.php b/app/Services/DirectonHtmlBuilder.php
index 5f720f3..b7ed42f 100644
--- a/app/Services/DirectonHtmlBuilder.php
+++ b/app/Services/DirectonHtmlBuilder.php
@@ -55,10 +55,16 @@ class DirectonHtmlBuilder
';
- foreach ($direction['entrance_examinations']['ЕГЭ']['Обязательные'] as $key => $el) {
- $EGE .= '' . $key . ' - ' . '' . $el . '
' ;
+ if (array_key_exists('ЕГЭ', $direction['entrance_examinations'])){
+ foreach ($direction['entrance_examinations']['ЕГЭ']['Обязательные'] as $key => $el) {
+ $EGE .= '' . $key . ' - ' . '' . $el . '
' ;
+ }
+ $EGE .= '
';
+ } else {
+ $EGE = '';
}
- $EGE .= '';
+
+
$po_viboru = '
Предметы по выбору
diff --git a/app/Services/DirectonHtmlBuilderForCalculator.php b/app/Services/DirectonHtmlBuilderForCalculator.php
index ddbba18..ec61a9f 100644
--- a/app/Services/DirectonHtmlBuilderForCalculator.php
+++ b/app/Services/DirectonHtmlBuilderForCalculator.php
@@ -55,11 +55,14 @@ class DirectonHtmlBuilderForCalculator
';
- foreach ($direction['entrance_examinations']['ЕГЭ']['Обязательные'] as $key => $el) {
- $EGE .= '' . $key . ' - ' . '' . $el . '
' ;
+ if (array_key_exists('ЕГЭ', $direction['entrance_examinations'])) {
+ foreach ($direction['entrance_examinations']['ЕГЭ']['Обязательные'] as $key => $el) {
+ $EGE .= '' . $key . ' - ' . '' . $el . '
';
+ }
+ $EGE .= '
';
+ } else {
+ $EGE = '';
}
- $EGE .= '';
-
$po_viboru = '
Предметы по выбору