Title: &quot;Column &#039;offset&#039; cannot be null&quot;?
Last modified: August 30, 2016

---

# "Column 'offset' cannot be null"?

 *  Resolved [iltrev](https://wordpress.org/support/users/iltrev/)
 * (@iltrev)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/column-offset-cannot-be-null/)
 * I think this happened after the last update, but I’m not completely sure about
   it.
    Anyway, I was warned by my maintainer that my error_log_php file was getting
   very big (it reached over 270 MB in size), so I took a look at it and found out
   tons of lines like this one:
 * **[22-Dec-2015 08:47:42 UTC] WordPress errore sul database Column ‘offset’ cannot
   be null per la query INSERT INTO’wp_wpb2d_processed_files'(‘file’,’uploadid’,’
   offset’) VALUES ([$PATH_TO_FILE], NULL, NULL) fatta da do_action_ref_array, call_user_func_array,
   run_dropbox_backup, WPB2D_BackupController->execute, WPB2D_BackupController->
   backup_path, WPB2D_Processed_Files->add_files, WPB2D_Processed_Base->upsert**
 * The error is the same for all the files being sent to dropbox, the only change
   is in $PATH_TO_FILE.
    I had to stop wpb2db to avoid this issue, so any help would
   be *VERY* appreciated…
 * Thanks in advance
 * [https://wordpress.org/plugins/wordpress-backup-to-dropbox/](https://wordpress.org/plugins/wordpress-backup-to-dropbox/)

Viewing 4 replies - 31 through 34 (of 34 total)

[←](https://wordpress.org/support/topic/column-offset-cannot-be-null/page/2/?output_format=md)
[1](https://wordpress.org/support/topic/column-offset-cannot-be-null/?output_format=md)
[2](https://wordpress.org/support/topic/column-offset-cannot-be-null/page/2/?output_format=md)
3

 *  [yoursumbuddy](https://wordpress.org/support/users/yoursumbuddy/)
 * (@yoursumbuddy)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/column-offset-cannot-be-null/page/3/#post-6874416)
 * [@richhelms](https://wordpress.org/support/users/richhelms/), thanks for your
   solution. It seems to have worked for me. I had to make the change in two places
   to stop the errors:
 *  ` public function update_file($file, $upload_id, $offset)
    { $this->upsert(array(‘
   file’ => $file, ‘uploadid’ => null, ‘offset’ => 0, )); // fix MariaDB null insert
   error }
 *  public function add_files($new_files)
    { foreach ($new_files as $file) {
 *  if ($this->get_file($file)) {
    continue; }
 *  $this->upsert(array(
    ‘file’ => $file, ‘uploadid’ => null, ‘offset’ => 0, ));}`
 *  [RichHelms](https://wordpress.org/support/users/richhelms/)
 * (@richhelms)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/column-offset-cannot-be-null/page/3/#post-6874417)
 * I can only find update_file getting called from UploadTracker.php
    public function
   track_upload($file, $upload_id, $offset) { $offset = is_null($offset) ? 0 : $
   offset;
 * and in Files.php
 *  public function file_complete($file)
    { $this->update_file($file, 0, 0); }
 * Neither will send a null.
 * I think you want to leave update_file alone as if it is doing a large upload,
   it sends in chunks and that is the offset
 * Rich
 *  Plugin Contributor [Michael De Wildt](https://wordpress.org/support/users/michaeldewildt/)
 * (@michaeldewildt)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/column-offset-cannot-be-null/page/3/#post-6874418)
 * Thanks for providing the code Rich and sorry for the delay in checking back here.
   I rarely find the time to read these forums anymore 🙁
 * I just pushed your change:
 *     ```
       --- wordpress-backup-to-dropbox/trunk/Classes/Processed/Files.php    2016-07-19 06:56:15 UTC (rev 1456734)
       +++ wordpress-backup-to-dropbox/trunk/Classes/Processed/Files.php       2016-07-19 06:57:59 UTC (rev 1456735)
       @@ -69,7 +69,7 @@
                    $this->upsert(array(
                        'file' => $file,
                        'uploadid' => null,
       -                'offset' => null,
       +                'offset' => 0,
                    ));
                }
       ```
   
 *  [RichHelms](https://wordpress.org/support/users/richhelms/)
 * (@richhelms)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/column-offset-cannot-be-null/page/3/#post-6874419)
 * Thanks Michael

Viewing 4 replies - 31 through 34 (of 34 total)

[←](https://wordpress.org/support/topic/column-offset-cannot-be-null/page/2/?output_format=md)
[1](https://wordpress.org/support/topic/column-offset-cannot-be-null/?output_format=md)
[2](https://wordpress.org/support/topic/column-offset-cannot-be-null/page/2/?output_format=md)
3

The topic ‘"Column 'offset' cannot be null"?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpress-backup-to-dropbox_ffffff.
   svg)
 * [WordPress Backup to Dropbox](https://wordpress.org/plugins/wordpress-backup-to-dropbox/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-backup-to-dropbox/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-backup-to-dropbox/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-backup-to-dropbox/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-backup-to-dropbox/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-backup-to-dropbox/reviews/)

 * 34 replies
 * 21 participants
 * Last reply from: [RichHelms](https://wordpress.org/support/users/richhelms/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/column-offset-cannot-be-null/page/3/#post-6874419)
 * Status: resolved