Skip to content

Commit

Permalink
rename function to avoid conflict, and set empty dirs to prevent poss…
Browse files Browse the repository at this point in the history
…ible asort() error
  • Loading branch information
cviebrock committed Feb 1, 2014
1 parent abb42b3 commit 8b85c26
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions opcache.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function size_for_humans($bytes) {
/**
* Borrowed from Laravel
*/
function array_set(&$array, $key, $value) {
function array_pset(&$array, $key, $value) {
if (is_null($key)) return $array = $value;
$keys = explode(DIRECTORY_SEPARATOR, ltrim($key,DIRECTORY_SEPARATOR));
while (count($keys) > 1) {
Expand Down Expand Up @@ -274,10 +274,10 @@ function toggleVisible(head, row) {
<th width="70%">Path</th>
</tr>
<?php
$d3scripts = array();
$d3scripts = $dirs = array();
foreach($status['scripts'] as $key=>$data) {
$dirs[dirname($key)][basename($key)]=$data;
array_set($d3scripts, $key, array(
array_pset($d3scripts, $key, array(
'name' => basename($key),
'size' => $data['memory_consumption'],
));
Expand Down

0 comments on commit 8b85c26

Please sign in to comment.