Help Center Live Community

Support => Installation Help & Software Support => Topic started by: victor on September 04, 2007, 10:03:33 PM



Title: Undefined variable: blob when creating an operator
Post by: victor on September 04, 2007, 10:03:33 PM
I use HCL 2.1.5 on a linux server and everytime I create an operator I receive the following error

Notice: Undefined variable: blob in /home2/user/public_html/support/class/operator.php on line 196

The operator gets created but this error is anoying

Any ideas about it?

Thanks


Title: Re: Undefined variable: blob when creating an operator
Post by: HCL Admin on September 04, 2007, 11:51:50 PM
Your error reporting setting for PHP is set too low.  I believe in /class/include.php you can change it.  Just set it from E_ALL to 0 and that will go away.  It's not actually an error, it's just a notice that the variable wasn't predefined.  I'll change it in the source code so the notice doesn't come up again.


Title: Re: Undefined variable: blob when creating an operator
Post by: gazoi on September 18, 2007, 10:43:31 AM

I would suggest that if a variable is to be used, it should be defined, no matter what the error reporting level.

This warning manifests itself when an operator is added with an image to be stored as a blob.

In hcl/class/operator.php,

replace code on line 196

Code:
if ($blob === '') $blob = ' ';

with

Code:
if( isset($blob) ) {
  if ($blob === '') $blob = ' ';
}



Title: Re: Undefined variable: blob when creating an operator
Post by: HCL Admin on September 18, 2007, 11:44:33 AM
Actually, that won't work.  That was done because if a bug in certain versions of PHP (yet another reason to go the PHP5+ route!).  Look at the logic, if it is set, then if it's null...  The actual fix is before the variable is assigned from the request, to do a var $blob; :)


Title: Re: Undefined variable: blob when creating an operator
Post by: XtremeCrash on September 20, 2007, 04:47:31 AM
Actully I get the same problem.I just installed today.Also The chat window pops up an theres a blank page.


Title: Re: Undefined variable: blob when creating an operator
Post by: victor on September 20, 2007, 04:50:16 PM
I solved my problem with mlzhosting advice, but I didn't have the "blank page" issue, take a look at this post

http://www.helpcenterlive.com/smf/index.php/topic,218.0.html