Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fdba921

Browse files
committed
fixed incorrect use of 'filename'
1 parent feeadce commit fdba921

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/FuelPHP/Upload/File.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,11 @@ public function validate()
204204
$this->container['extension'] = ltrim(strrchr(ltrim($this->container['name'], '.'), '.'),'.');
205205
if (empty($this->container['extension']))
206206
{
207-
$this->container['filename'] = $this->container['name'];
207+
$this->container['basename'] = $this->container['name'];
208208
}
209209
else
210210
{
211-
$this->container['filename'] = substr($this->container['name'], 0, strlen($this->container['name'])-(strlen($this->container['extension'])+1));
211+
$this->container['basename'] = substr($this->container['name'], 0, strlen($this->container['name'])-(strlen($this->container['extension'])+1));
212212
}
213213

214214
// does this upload exceed the maximum size?
@@ -336,7 +336,7 @@ public function save()
336336
// do we need to normalize the filename?
337337
else
338338
{
339-
$this->container['filename'] = $this->container['name'];
339+
$this->container['filename'] = $this->container['basename'];
340340
(bool) $this->config['normalize'] and $this->normalize();
341341
}
342342
}

0 commit comments

Comments
 (0)