Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
11c78cb4
Commit
11c78cb4
authored
Nov 05, 2013
by
Gudz Taras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed validateFile() method access from protected to public, fixed hasErrors check
parent
3ef20e59
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
FileValidator.php
framework/yii/validators/FileValidator.php
+1
-1
ImageValidator.php
framework/yii/validators/ImageValidator.php
+2
-2
No files found.
framework/yii/validators/FileValidator.php
View file @
11c78cb4
...
...
@@ -168,7 +168,7 @@ class FileValidator extends Validator
* @param string $attribute the attribute being validated
* @param UploadedFile $file uploaded file passed to check against a set of rules
*/
p
rotected
function
validateFile
(
$object
,
$attribute
,
$file
)
p
ublic
function
validateFile
(
$object
,
$attribute
,
$file
)
{
switch
(
$file
->
error
)
{
case
UPLOAD_ERR_OK
:
...
...
framework/yii/validators/ImageValidator.php
View file @
11c78cb4
...
...
@@ -145,11 +145,11 @@ class ImageValidator extends FileValidator
* @param string $attribute the attribute being validated
* @param UploadedFile $file uploaded file passed to check against a set of rules
*/
p
rotected
function
validateFile
(
$object
,
$attribute
,
$file
)
p
ublic
function
validateFile
(
$object
,
$attribute
,
$file
)
{
parent
::
validateFile
(
$object
,
$attribute
,
$file
);
if
(
false
===
$object
->
hasErrors
(
$attribute
))
{
if
(
!
$object
->
hasErrors
(
$attribute
))
{
$this
->
validateImage
(
$object
,
$attribute
,
$file
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment