Php 传递的参数无效-正在工作,现在不工作
我已经让这段代码运行了几年,现在我不相信有任何更改,但几天前它刚刚停止工作,并开始给我这个错误: 警告:内爆()[函数.内爆]:传入的参数无效 /home/vss/public_html/dashboard/modules/addons/vssapp/classes/class.adminarea.php 在线277 可捕获的致命错误:无法转换类stdClass的对象 串通 /home/vss/public_html/dashboard/modules/addons/vssapp/dropbox/dropbox/OAuth/Consumer/Curl.php 在线102 class.adminarea.php:Php 传递的参数无效-正在工作,现在不工作,php,Php,我已经让这段代码运行了几年,现在我不相信有任何更改,但几天前它刚刚停止工作,并开始给我这个错误: 警告:内爆()[函数.内爆]:传入的参数无效 /home/vss/public_html/dashboard/modules/addons/vssapp/classes/class.adminarea.php 在线277 可捕获的致命错误:无法转换类stdClass的对象 串通 /home/vss/public_html/dashboard/modules/addons/vssapp/dropbox
foreach($imagedata as $image){
$data = '';
$sizes = getimagesize($image['path'].'?dl=false');
$data .= 'Filename: '."".$image['filename']."\n";
$data .= 'Image Size:' ."".$sizes[0].'px x '.$sizes[1].'px'."\n";
$data .= 'Path: '."".$image['path'].'?dl=false'."\n";
$data .= 'Rooms: '." ".ucwords(implode(", ", array_keys(unserialize($image['rooms']))))."\n";
if($image['couch'] != ''){$data .= 'Couch Position: '."".$image['couch']."\n";}
if($image['headboard'] != ''){$data .= 'Headboard Position: '."".$image['headboard']."\n";}
if($image['generaldiningroom'] != ''){$data .= 'Dining Room Position: '."".$image['generaldiningroom']."\n";}
if($image['generallivingroom'] != ''){$data .= 'Living Room Position: '."".$image['generallivingroom']."\n";}
$data .= 'Furniture: '."".implode(", ", unserialize($image['furniture']))."\n";
$data .= 'Info: '."".$image['info']."\n\n--------------------------\n\n";
$imagedetails[] = $data;
}
// Check if an error occurred and throw an Exception
if (!empty($response['body']->error)) {
$message = $response['body']->error . ' (Status Code: ' . $response['code'] . ')';
throw new \Dropbox\Exception($message);
}
return $response;
}
Curl.php:
foreach($imagedata as $image){
$data = '';
$sizes = getimagesize($image['path'].'?dl=false');
$data .= 'Filename: '."".$image['filename']."\n";
$data .= 'Image Size:' ."".$sizes[0].'px x '.$sizes[1].'px'."\n";
$data .= 'Path: '."".$image['path'].'?dl=false'."\n";
$data .= 'Rooms: '." ".ucwords(implode(", ", array_keys(unserialize($image['rooms']))))."\n";
if($image['couch'] != ''){$data .= 'Couch Position: '."".$image['couch']."\n";}
if($image['headboard'] != ''){$data .= 'Headboard Position: '."".$image['headboard']."\n";}
if($image['generaldiningroom'] != ''){$data .= 'Dining Room Position: '."".$image['generaldiningroom']."\n";}
if($image['generallivingroom'] != ''){$data .= 'Living Room Position: '."".$image['generallivingroom']."\n";}
$data .= 'Furniture: '."".implode(", ", unserialize($image['furniture']))."\n";
$data .= 'Info: '."".$image['info']."\n\n--------------------------\n\n";
$imagedetails[] = $data;
}
// Check if an error occurred and throw an Exception
if (!empty($response['body']->error)) {
$message = $response['body']->error . ' (Status Code: ' . $response['code'] . ')';
throw new \Dropbox\Exception($message);
}
return $response;
}
关于发生了什么以及如何修复它有什么想法吗?你能将它添加到3v4l.org中让我们看看吗?3v4l允许您针对许多不同的版本运行它,这样您就可以看到它在什么时候崩溃了。“不要相信有任何更改”-这听起来像是第一件要确定的事情-源代码管理说了什么?@NeilMasters:@OliverCharlesworth-对此没有源代码管理,我是唯一有访问权限的人。我认为更有可能发生了其他事情。这与Dropbox API和Google drive API集成在一起,所以我想知道是不是其中的一个原因导致了它。但此时确实不确定。引用的行“invalid argument”错误是家具行:
$data.='furniture:'。“”。内爆(“,”,取消序列化($image['furniture']))。“\n”代码>