2011-04-11 2 views
1

항상 그런 것은 아닙니다. 때로는 같은 GIF를 업로드 할 수 있으며 때로는이 오류를 다시받을 수도 있습니다. 거의 무작위로 보입니다.Kusaba로 큰 GIFS 업로드

$foo = 123; 
foreach ($foo as $bar) 

이는 Invalid argument supplied for foreach() 경고를 던졌습니다 :

Warning: Invalid argument supplied for foreach() in /webroot/i/n/*001/*.org/www/inc/classes/board-post.class.php on line 81 
Warning: Cannot modify header information - headers already sent by (output started at /webroot/i/n/*/*.org/www/inc/classes/board-post.class.php:81) in /webroot/i/n/*/*.org/www/board.php on line 343 
Warning: Cannot modify header information - headers already sent by (output started at /webroot/i/n/*/*.org/www/inc/classes/board-post.class.php:81) in /webroot/i/n/*/*.org/www/board.php on line 347 
Warning: Cannot modify header information - headers already sent by (output started at /webroot/i/n/*/*.org/www/inc/classes/board-post.class.php:81) in /webroot/i/n/*/*.org/www/board.php on line 350 
Warning: Invalid argument supplied for foreach() in /webroot/i/n/*/*.org/www/inc/func/posts.php on line 249 
Warning: Invalid argument supplied for foreach() in /webroot/i/n/*/*.org/www/inc/classes/board-post.class.php on line 136 
Warning: Invalid argument supplied for foreach() in /webroot/i/n/*/*.org/www/inc/classes/board-post.class.php on line 163 
Warning: Invalid argument supplied for foreach() in /webroot/i/n/*/*.org/www/inc/func/fetching.php on line 27 
Warning: Invalid argument supplied for foreach() in /webroot/i/n/*/*.org/www/inc/classes/board-post.class.php on line 343 
Warning: Invalid argument supplied for foreach() in /webroot/i/n/*/*.org/www/inc/classes/board-post.class.php on line 443 
Warning: Invalid argument supplied for foreach() in /webroot/i/n/*/*.org/www/inc/func/fetching.php on line 27 
Warning: Cannot modify header information - headers already sent by (output started at /webroot/i/n/*/*.org/www/inc/classes/board-post.class.php:81) in /webroot/i/n/*/*.org/www/inc/func/misc.php on line 76 

답변

1

어딘가에 당신처럼 foreach 문에서 배열이 아니다 변수를 사용하고 있습니다. 변수가 예상대로 배열인지 확인하십시오.

이 경고가 throw되고 출력이 헤더 블록을 보내지 못하도록 차단하여 다른 경고가 발생합니다 (Cannot modify header information 경고). 당신이 $results 배열을 순환하려면

+0

이것은 첫 번째 오류의 80 ~ 84 행입니다. \t \t \t의 foreach ($ 결과 [0] $로서 키 => $ 라인) { \t \t \t \t 경우 (! 각각 is_numeric ($ 키)) { \t \t \t \t \t $ this-> 보드 [$ key] = $ line; \t \t \t \t} 수단 \t \t \t} – Tom

+0

@ 톰은 $ '[0]'배열이 아닌 결과. – deceze

0

, 당신은

foreach ($results as $key=>$value)

보다는

자체가 배열 인 $results[0]하지 않는

foreach ($results[0] as $key=>$value)

,이 경우 $results가 될 것이다 작성해야 행렬 (배열의 배열).

+0

나를 위해, 같은 문제가 작동하지 않았다. – Tom

관련 문제