|
53 | 53 | $data['title'] = $this('lang')->translate('Fieldsets'); |
54 | 54 |
|
55 | 55 | $template = dirname(__DIR__) . '/template/fieldset'; |
56 | | - if (is_dir($response->get('page', 'template_root'))) { |
| 56 | + if (is_dir($response->get('page', 'template_root') ?? '')) { |
57 | 57 | $template = $response->get('page', 'template_root'); |
58 | 58 | } |
59 | 59 |
|
|
113 | 113 | //----------------------------// |
114 | 114 | // 2. Render Template |
115 | 115 | $template = dirname(__DIR__) . '/template/fieldset'; |
116 | | - if (is_dir($response->get('page', 'template_root'))) { |
| 116 | + if (is_dir($response->get('page', 'template_root') ?? '')) { |
117 | 117 | $template = $response->get('page', 'template_root'); |
118 | 118 | } |
119 | 119 |
|
|
180 | 180 | $data = $request->getPost(); |
181 | 181 |
|
182 | 182 | //if detail has no value make it null |
183 | | - if (isset($data['detail']) && !trim((string) $data['detail'])) { |
| 183 | + if (isset($data['detail']) && !trim($data['detail'])) { |
184 | 184 | $data['detail'] = null; |
185 | 185 | } |
186 | 186 |
|
|
238 | 238 | //----------------------------// |
239 | 239 | // 2. Render Template |
240 | 240 | $template = dirname(__DIR__) . '/template/fieldset'; |
241 | | - if (is_dir($response->get('page', 'template_root'))) { |
| 241 | + if (is_dir($response->get('page', 'template_root') ?? '')) { |
242 | 242 | $template = $response->get('page', 'template_root'); |
243 | 243 | } |
244 | 244 |
|
|
302 | 302 | //----------------------------// |
303 | 303 | // 2. Process Data |
304 | 304 | $template = dirname(__DIR__) . '/template/fieldset'; |
305 | | - if (is_dir($response->get('page', 'template_root'))) { |
| 305 | + if (is_dir($response->get('page', 'template_root') ?? '')) { |
306 | 306 | $template = $response->get('page', 'template_root'); |
307 | 307 | } |
308 | 308 |
|
|
469 | 469 | //----------------------------// |
470 | 470 | // 2. Render Template |
471 | 471 | $template = dirname(__DIR__) . '/template/fieldset'; |
472 | | - if (is_dir($response->get('page', 'template_root'))) { |
| 472 | + if (is_dir($response->get('page', 'template_root') ?? '')) { |
473 | 473 | $template = $response->get('page', 'template_root'); |
474 | 474 | } |
475 | 475 |
|
|
496 | 496 | //get the content |
497 | 497 | $fieldset = $request->getStage('fieldset'); |
498 | 498 | //get the type |
499 | | - $type = substr($fieldset, 5, strpos((string) $fieldset, ';base64') - 5); |
| 499 | + $type = substr($fieldset, 5, strpos($fieldset, ';base64') - 5); |
500 | 500 |
|
501 | 501 | //invalid file? |
502 | 502 | if ($type !== 'application/json' && $type !== 'application/zip') { |
|
505 | 505 |
|
506 | 506 | //decode the content |
507 | 507 | $content = base64_decode( |
508 | | - substr($fieldset, strpos((string) $fieldset, ';base64,') + 8) |
| 508 | + substr($fieldset, strpos($fieldset, ';base64,') + 8) |
509 | 509 | ); |
510 | 510 |
|
511 | 511 | //json file? |
|
587 | 587 |
|
588 | 588 | //root or not under fieldset? |
589 | 589 | if ($filename === 'fieldset/' |
590 | | - || strpos((string) $filename, 'fieldset/') === false |
| 590 | + || strpos($filename, 'fieldset/') === false |
591 | 591 | ) { |
592 | 592 | continue; |
593 | 593 | } |
|
682 | 682 | //----------------------------// |
683 | 683 | // 2. Render Template |
684 | 684 | $template = dirname(__DIR__) . '/template/fieldset'; |
685 | | - if (is_dir($response->get('page', 'template_root'))) { |
| 685 | + if (is_dir($response->get('page', 'template_root') ?? '')) { |
686 | 686 | $template = $response->get('page', 'template_root'); |
687 | 687 | } |
688 | 688 |
|
|
755 | 755 | //----------------------------// |
756 | 756 | // 2. Render Template |
757 | 757 | $template = dirname(__DIR__) . '/template/fieldset'; |
758 | | - if (is_dir($response->get('page', 'template_root'))) { |
| 758 | + if (is_dir($response->get('page', 'template_root') ?? '')) { |
759 | 759 | $template = $response->get('page', 'template_root'); |
760 | 760 | } |
761 | 761 |
|
|
838 | 838 | //----------------------------// |
839 | 839 | // 2. Render Template |
840 | 840 | $template = dirname(__DIR__) . '/template/fieldset'; |
841 | | - if (is_dir($response->get('page', 'template_root'))) { |
| 841 | + if (is_dir($response->get('page', 'template_root') ?? '')) { |
842 | 842 | $template = $response->get('page', 'template_root'); |
843 | 843 | } |
844 | 844 |
|
|
868 | 868 | $data = $request->getPost(); |
869 | 869 |
|
870 | 870 | //if detail has no value make it null |
871 | | - if (isset($data['detail']) && !trim((string) $data['detail'])) { |
| 871 | + if (isset($data['detail']) && !trim($data['detail'])) { |
872 | 872 | $data['detail'] = null; |
873 | 873 | } |
874 | 874 |
|
|
0 commit comments