Hmm, I wonder if $sql_connection need to be set to '', since the code sets $connection_real to sql_connection if it exists - if we dont pass it, it woudl just use the default (wrong) value), I believe.  So perhaps setting the content to '' explicitly would both get rid of the error and not give us the warning?  I may give that a try here shortly