note 108853 modified in function.ob-start by danbrown

From: Date: Wed, 30 May 2012 14:45:08 +0000
Subject: note 108853 modified in function.ob-start by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-188296@lists.php.net to get a copy of this message
Just a word of warning to those like myself who are upgrading from 5.3. I have a piece of code that used to work:

<?php
if ( !ob_start( !DEBUGMODE ? 'ob_gzhandler' : '' ) ) {
	ob_start();
}
?>

Which is not working anymore (I get an error like: Warning: ob_start(): function '' not found or invalid function name).

It's easily fixed though, just changed the '' to a null, like this:

<?php
if ( !ob_start( !DEBUGMODE ? 'ob_gzhandler' : null ) ) {
	ob_start();
}		
?>

Which preserves the code intention but works :) --was-- Just a word of warning to those like myself who are upgrading from 5.3. I have a piece of code that used to work: if ( !ob_start( !DEBUGMODE ? 'ob_gzhandler' : '' ) ) { ob_start(); } Which is not working anymore (I get an error like: Warning: ob_start(): function '' not found or invalid function name). It's easily fixed though, just changed the '' to a null, like this: if ( !ob_start( !DEBUGMODE ? 'ob_gzhandler' : null ) ) { ob_start(); } Which preserves the code intention but works :) http://php.net/manual/en/function.ob-start.php

« previous php.notes (#188296) next »