PHP Warning: Invalid argument supplied for foreach()
-
Hello!
My backups were working fine for several months. Then, I noticed the error_log file had completely used up the allotted 100GB of disk space.
This message over and over:
[27-Oct-2014 22:55:38 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/raycallippe/public_html/wp-content/plugins/wponlinebackup/include/tables.php on line 693
[27-Oct-2014 22:55:38 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/raycallippe/public_html/wp-content/plugins/wponlinebackup/include/tables.php on line 693All the background info:
Online Backup for WordPress Plugin Version 3.0.4
WordPress Version: 4.0 (standalone)
PHP Version: 5.5.17
Server Software: Apache mod_fcgid/2.3.10-dev
MySQL Server Version:
MySQL Client Version: 1.0; MySQL Packet Size: 32 MiB
Memory: 256M; Post: 8M; Upload: 2M; Timeout: 30
Memory Changable: Yes; Admin Cache Size: 115.62 KiB
Status: 1 row, 29.2 KiB packet size, 88.66 KiB cache freed, 19.95 MiB memory used
Capabilities: hashcopy gzdeflate php5hash DES AES128 AES192 AES256
End of InformationCode from tables.php (beginning on line 682:
// Create a fully escaped insert statement $insert = ''; $row_count = 0; $insert_size = 0; while ( false !== ( $next_row = $this->Fetch_Row( $result ) ) ) { $row = $next_row; $values = array(); $row_count++; foreach ( $row as $index => $value ) { $insert_size += strlen( $value ); // If we're not the first row and our insert has got too big, write the insert and start another // This prevents our insert getting rediculously big if ( $row_count > 1 && $insert_size > $this->max_block_size ) { $row_count--; break 2; } if ( is_null( $value ) ) { $value = 'NULL'; } else if ( !$this->Requires_Quotes( $value ) ) { } else { // escape_by_ref uses _real_escape - preferred. escape() appears to only use _weak_escape() $wpdb->escape_by_ref( $value ); $value = '\'' . $value . '\''; } $values[] = $value; }
Thank you!
- The topic ‘PHP Warning: Invalid argument supplied for foreach()’ is closed to new replies.