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
cb8100d7
Commit
cb8100d7
authored
Apr 30, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improved apidoc property detection
do not allow empty property name fixes #3297
parent
353cf891
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
Context.php
extensions/apidoc/models/Context.php
+2
-6
No files found.
extensions/apidoc/models/Context.php
View file @
cb8100d7
...
...
@@ -192,7 +192,6 @@ class Context extends Component
return
$this
->
inheritMethodRecursive
(
$method
,
$parent
);
}
}
return
$method
;
}
...
...
@@ -209,7 +208,7 @@ class Context extends Component
if
(
$method
->
isStatic
)
{
continue
;
}
if
(
!
strncmp
(
$name
,
'get'
,
3
)
&&
$this
->
paramsOptional
(
$method
))
{
if
(
!
strncmp
(
$name
,
'get'
,
3
)
&&
strlen
(
$name
)
>
3
&&
$this
->
paramsOptional
(
$method
))
{
$propertyName
=
'$'
.
lcfirst
(
substr
(
$method
->
name
,
3
));
if
(
isset
(
$class
->
properties
[
$propertyName
]))
{
$property
=
$class
->
properties
[
$propertyName
];
...
...
@@ -238,7 +237,7 @@ class Context extends Component
]);
}
}
if
(
!
strncmp
(
$name
,
'set'
,
3
)
&&
$this
->
paramsOptional
(
$method
,
1
))
{
if
(
!
strncmp
(
$name
,
'set'
,
3
)
&&
strlen
(
$name
)
>
3
&&
$this
->
paramsOptional
(
$method
,
1
))
{
$propertyName
=
'$'
.
lcfirst
(
substr
(
$method
->
name
,
3
));
if
(
isset
(
$class
->
properties
[
$propertyName
]))
{
$property
=
$class
->
properties
[
$propertyName
];
...
...
@@ -282,7 +281,6 @@ class Context extends Component
return
false
;
}
}
return
true
;
}
...
...
@@ -297,7 +295,6 @@ class Context extends Component
return
$param
;
}
}
return
null
;
}
...
...
@@ -320,7 +317,6 @@ class Context extends Component
return
true
;
}
}
return
false
;
}
}
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