Laravel version update
Laravel version update
This commit is contained in:
@@ -23,10 +23,7 @@ class MemoryDataCollector extends DataCollector implements LateDataCollectorInte
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->data = array(
|
||||
'memory' => 0,
|
||||
'memory_limit' => $this->convertToBytes(ini_get('memory_limit')),
|
||||
);
|
||||
$this->reset();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -37,6 +34,17 @@ class MemoryDataCollector extends DataCollector implements LateDataCollectorInte
|
||||
$this->updateMemoryUsage();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function reset()
|
||||
{
|
||||
$this->data = array(
|
||||
'memory' => 0,
|
||||
'memory_limit' => $this->convertToBytes(ini_get('memory_limit')),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
@@ -90,17 +98,20 @@ class MemoryDataCollector extends DataCollector implements LateDataCollectorInte
|
||||
$memoryLimit = strtolower($memoryLimit);
|
||||
$max = strtolower(ltrim($memoryLimit, '+'));
|
||||
if (0 === strpos($max, '0x')) {
|
||||
$max = intval($max, 16);
|
||||
$max = \intval($max, 16);
|
||||
} elseif (0 === strpos($max, '0')) {
|
||||
$max = intval($max, 8);
|
||||
$max = \intval($max, 8);
|
||||
} else {
|
||||
$max = (int) $max;
|
||||
}
|
||||
|
||||
switch (substr($memoryLimit, -1)) {
|
||||
case 't': $max *= 1024;
|
||||
// no break
|
||||
case 'g': $max *= 1024;
|
||||
// no break
|
||||
case 'm': $max *= 1024;
|
||||
// no break
|
||||
case 'k': $max *= 1024;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user