[I128-2309] Fatal error:  Uncaught Error: Call to a member function GetSubField() on null in modules/FT/Pages/ShowFT.page:16


НАЧАЛО >> Оглавление >> Общее описание >> История изменений >> Что нового в проекте I128 >> Версия 2026.1.1 >> [I128-2309] Fatal error:  Uncaught Error: Call to a member function GetSubField() on null in modules/FT/Pages/ShowFT.page:16📄 Скачать в DOCX


Тип Версия Статус Приоритет Исполнитель
⚙️ Исправление ошибок 2026.1.1 🔘 Завершено Средний Ilya Mikhaylenko

Компоненты: Комплексное решение Электронная библиотека ИРБИС64/128

Завершено: 15.04.2026 11:03

Симптом:

Если запись по переданному параметру sid не была найдена (например, неверный или пустой sid), скрипт страницы FT/ShowFT падает с ошибкой PHP Fatal error: Uncaught Error: Call to a member function GetSubField() on null:

 

[03~~Apr~~2026 10:20:21 Europe/Moscow] PHP Fatal error:  Uncaught Error: Call to a member function GetSubField() on null in E:\htdocs_master\modules\FT\Pages\ShowFT.page:16
Stack trace:
# 1.0 E:\htdocs*master\modules\Pages**call\EchoPageTitle.inc(46): Page*FT_ShowFT->GetTitle()
# 2.1 E:\htdocs*master\classes\ObjectModule.php(289): fncall*Pages_EchoPageTitle->Exec()
# 3.2 E:\i128Data\GPNTB5\templates*c\31954ab4040ac2b3e4b4ed6551e178a42cc1597f*0.file.Page3.tpl.php(75): ObjectModule->__call('EchoPageTitle', Array)
# 4.3 E:\htdocs*master\vendor\smarty\smarty\libs\sysplugins\smarty*template*resource*base.php(123): content*69a7142f171354*58733718(Object(Smarty*Internal*Template))
# 5.4 E:\htdocs*master\vendor\smarty\smarty\libs\sysplugins\smarty*template*compiled.php(114): Smarty*Template*Resource*Base->getRenderedTemplateCode(Object(Smarty*Internal*Template))
# 6.5 E:\htdocs*master\vendor\smarty\smarty\libs\sysplugins\smarty*internal*template.php(216): Smarty*Template*Compiled->render(Object(Smarty*Internal_Template))
# 7.6 E:\htdocs*master\vendor\smarty\smarty\libs\sysplugins\smarty*internal*template.php(385): Smarty*Internal_Template->render()
# 8.7 E:\i128Data\GPNTB5\templates*c\e73a0a074c053922da5b64a8f54a440ad2699f27*0.file.Index.tpl.php(27): Smarty*Internal*Template->_subTemplateRender('file:Page3.tpl', NULL, NULL, 0, 3600, Array, 0, false)
# 9.8 E:\htdocs*master\vendor\smarty\smarty\libs\sysplugins\smarty*template*resource*base.php(123): content*68018679f311f7*00680697(Object(Smarty*Internal*Template))
# 10.9 E:\htdocs*master\vendor\smarty\smarty\libs\sysplugins\smarty*template*compiled.php(114): Smarty*Template*Resource*Base->getRenderedTemplateCode(Object(Smarty*Internal*Template))
# 11.10 E:\htdocs*master\vendor\smarty\smarty\libs\sysplugins\smarty*internal*template.php(216): Smarty*Template*Compiled->render(Object(Smarty*Internal_Template))
# 12.11 E:\htdocs*master\vendor\smarty\smarty\libs\sysplugins\smarty*internal*templatebase.php(232): Smarty*Internal_Template->render(false, 1)
# 13.12 E:\htdocs*master\vendor\smarty\smarty\libs\sysplugins\smarty*internal*templatebase.php(134): Smarty*Internal*TemplateBase->*execute(Object(Smarty*Internal*Template), NULL, NULL, NULL, 1)
# 14.13 E:\htdocs*master\modules\Host**call\Show.inc(14): Smarty*Internal_TemplateBase->display('Index.tpl')
# 15.14 E:\htdocs*master\classes\ObjectModule.php(289): fncall*Host_Show->Exec()
# 16.15 E:\htdocs*master\index.php(15): ObjectModule->*_call('Show', Array)
# 17.16 {main}
  thrown in E:\htdocs_master\modules\FT\Pages\ShowFT.page on line 16

 

Исправление:

Добавлена проверка переменной $r на null в методе GetTitle() файла ShowFT.page.

Теперь в такой ситуации метод безопасно возвращает заголовок по умолчанию «Просмотр полного текста».

 

-

Добавлена проверка переменной $r на null в методе GetTitle() файла ShowFT.page. Ранее, если запись по переданному параметру sid не была найдена (например, неверный или пустой sid), скрипт падал с ошибкой PHP Fatal error: Uncaught Error: Call to a member function GetSubField() on null. Теперь в такой ситуации метод безопасно возвращает заголовок по умолчанию «Просмотр полного текста».