PHP Warning “Warning: ob_start(): function '' not found or invalid function name” in Symfony 1?

我的未来我决定 提交于 2019-12-03 09:41:11

Try using a null value instead of the empty string.

ob_start(sfConfig::get('sf_compressed') ? 'ob_gzhandler' : null);
Roy Orpiano

-ob_start(sfConfig::get('sf_compressed') ? 'ob_gzhandler' : '');

+ob_start(sfConfig::get('sf_compressed') ? 'ob_gzhandler' : null);

This was fixed in symfony 1.4.16

See symfony 1.4.16 changelog:

  • [...]
  • [33214] fixed ob_start() behavior on CLI (closes #9970)
  • [33208] fixed ob_start usage (to avoid warning in PHP 5.4, closes #9970)

So simply make sure to use at least that version.

Preferably use the latest/last/final symfony 1.x version released, which is 1.4.20.

You can grab them at the official Git mirror for symfony 1.x .

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!