merge r4424 from branch 2.0 to trunk
bug 1210 fixed: check if the memory_get_usage function is available before using it. git-svn-id: http://piwigo.org/svn/trunk@4425 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
eaacc88183
commit
110ce79b3c
1 changed files with 9 additions and 3 deletions
|
|
@ -972,7 +972,9 @@ function merge_chunks($output_filepath, $original_sum, $type)
|
|||
|
||||
sort($chunks);
|
||||
|
||||
ws_logfile('[merge_chunks] memory_get_usage before loading chunks: '.memory_get_usage());
|
||||
if (function_exists('memory_get_usage')) {
|
||||
ws_logfile('[merge_chunks] memory_get_usage before loading chunks: '.memory_get_usage());
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
|
||||
|
|
@ -980,7 +982,9 @@ function merge_chunks($output_filepath, $original_sum, $type)
|
|||
{
|
||||
$string = file_get_contents($chunk);
|
||||
|
||||
ws_logfile('[merge_chunks] memory_get_usage on chunk '.++$i.': '.memory_get_usage());
|
||||
if (function_exists('memory_get_usage')) {
|
||||
ws_logfile('[merge_chunks] memory_get_usage on chunk '.++$i.': '.memory_get_usage());
|
||||
}
|
||||
|
||||
if (!file_put_contents($output_filepath, $string, FILE_APPEND))
|
||||
{
|
||||
|
|
@ -991,7 +995,9 @@ function merge_chunks($output_filepath, $original_sum, $type)
|
|||
unlink($chunk);
|
||||
}
|
||||
|
||||
ws_logfile('[merge_chunks] memory_get_usage after loading chunks: '.memory_get_usage());
|
||||
if (function_exists('memory_get_usage')) {
|
||||
ws_logfile('[merge_chunks] memory_get_usage after loading chunks: '.memory_get_usage());
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue