Changeset 4425


Ignore:
Timestamp:
12/04/09 22:57:50 (9 years ago)
Author:
plg
Message:

merge r4424 from branch 2.0 to trunk

bug 1210 fixed: check if the memory_get_usage function is available before
using it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/ws_functions.inc.php

    r4367 r4425  
    973973  sort($chunks); 
    974974 
    975   ws_logfile('[merge_chunks] memory_get_usage before loading chunks: '.memory_get_usage()); 
     975  if (function_exists('memory_get_usage')) { 
     976    ws_logfile('[merge_chunks] memory_get_usage before loading chunks: '.memory_get_usage()); 
     977  } 
    976978 
    977979  $i = 0; 
     
    981983    $string = file_get_contents($chunk); 
    982984 
    983     ws_logfile('[merge_chunks] memory_get_usage on chunk '.++$i.': '.memory_get_usage()); 
     985    if (function_exists('memory_get_usage')) { 
     986      ws_logfile('[merge_chunks] memory_get_usage on chunk '.++$i.': '.memory_get_usage()); 
     987    } 
    984988 
    985989    if (!file_put_contents($output_filepath, $string, FILE_APPEND)) 
     
    992996  } 
    993997 
    994   ws_logfile('[merge_chunks] memory_get_usage after loading chunks: '.memory_get_usage()); 
     998  if (function_exists('memory_get_usage')) { 
     999    ws_logfile('[merge_chunks] memory_get_usage after loading chunks: '.memory_get_usage()); 
     1000  } 
    9951001} 
    9961002 
Note: See TracChangeset for help on using the changeset viewer.