Undefined index in ..../lib/upload_functions.php on line 720

5 posts by 2 authors in: Forums > CMS Builder
Last Post: April 4, 2016   (RSS)

By northernpenguin - March 30, 2016

I am using CMSB 3.02 (build 2060) with PHP 5.5.9.  When I add a new record and upload a PDF attachment (any attachment) I get the notice listed in the subject line (also see the attached screen shot.

The developer log has the following backtrace info:

#0  _errorlog_logErrorRecord() called at [/var/www/html/cmsb/lib/errorlog_functions.php:60]
#1  _errorlog_catchRuntimeErrors() called at [/var/www/html/cmsb/lib/upload_functions.php:720]
#2  removeExpiredUploads() called at [/var/www/html/cmsb/lib/menus/default/uploadForm_functions.php:40]
#3  submitUploadForm() called at [/var/www/html/cmsb/lib/menus/default/uploadForm_functions.php:20]
#4  require_once(/var/www/html/cmsb/lib/menus/default/uploadForm_functions.php) called at [/var/www/html/cmsb/lib/menus/default/uploadForm.php:3]
#5  include(/var/www/html/cmsb/lib/menus/default/uploadForm.php) called at [/var/www/html/cmsb/lib/menus/default/actionHandler.php:67]
#6  include(/var/www/html/cmsb/lib/menus/default/actionHandler.php) called at [/var/www/html/cmsb/admin.php:40]

It doesn't always happen.  The Notice seems to show up randomly.

Any ideas?

Ragi.

--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

By gregThomas - March 31, 2016

Hi Ragi,

Thanks for the detailed error reporting, I've taken a look at the code, and I think I might know what's causing this. 

Have you recently removed a section that contained an upload field? And if so, did you delete the schema directly from the schema directory? 

It looks like that error could be thrown if CMS Builder finds an unlinked upload that belongs to a section that no longer exists. If I can confirm the issue, I'll make sure that we resolve it in our next release. 

Cheers,

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By gregThomas - April 4, 2016

Hi Ragi, 

Thanks for those extra details, I was able to recreate the issue in the latest build of CMS Builder. I've informed the lead developers about it, the problem will be resolved in the next release of CMS Builder.

The issue happens when you delete an upload field from a section that has uploads in it. The uploads aren't removed when the field is deleted causing an error to display when the upload clean up function runs next time you upload something.

Cheers,

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By northernpenguin - April 4, 2016

Thanks Greg!

--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke