Undefined variable error when uploading files

4 posts by 3 authors in: Forums > CMS Builder
Last Post: June 20, 2017   (RSS)

By kitsguru - June 16, 2017

your php settings also need to be adjusted - not just CMSB

Jeff Shields

By Dave - June 17, 2017

Hi Jeff, 

Looks like that's a bug with some rarely seen error checking code.

In /lib/upload_functions.php can you try searching for "not chunked" and replace this: 

  // ...not chunked?
  else {
    
    if (!$skipUploadSecurityCheck && !is_uploaded_file($uploadInfo['tmp_name'])) {
      return "Error saving '$encodedFilename', file wasn't uploaded properly.<br/>\n";
    }

With this:

  // ...not chunked?
  else {
    
    if (!$skipUploadSecurityCheck && !is_uploaded_file($uploadInfo['tmp_name'])) {
      return "Error saving '" .htmlencode($uploadInfo['name']). "', file wasn't uploaded properly.<br/>\n";
    }

We'll get this fixed for the next release.  Thanks for the report!

Dave Edis - Senior Developer
interactivetools.com

By JeffC - June 20, 2017

Thanks Dave

That's fixed the error message. It is now returning "Error saving 'filename.pdf', file wasn't uploaded properly." as expected.

Thanks, Jeff Shields for the info too.

Jeff