Skip to content

Commit a553845

Browse files
author
phalcon
committed
Removing callable service definitions support
1 parent 496901c commit a553845

File tree

3 files changed

+3
-22
lines changed

3 files changed

+3
-22
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- Added Phalcon\Cache\Backend::stop() to stop the cache without store anything into the backend
88
- Fixed bug in Phalcon\Mvc\View that saves a empty cached content when using a cache
99
- Implemented Phalcon\Db::FETCH_OBJ to return objects instead of arrays
10+
- Removed checking for callable definitions in Phalcon\DI due to security reasons
1011

1112
0.6.0
1213
- Added functions version, version_id, date and time to Volt

build/phalcon.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53027,17 +53027,7 @@ PHP_METHOD(Phalcon_DI, _factory){
5302753027
}
5302853028
}
5302953029
} else {
53030-
if (phalcon_is_callable(service TSRMLS_CC)) {
53031-
if (Z_TYPE_P(parameters) == IS_ARRAY) {
53032-
PHALCON_INIT_NVAR(instance);
53033-
PHALCON_CALL_USER_FUNC_ARRAY(instance, service, parameters);
53034-
} else {
53035-
PHALCON_INIT_NVAR(instance);
53036-
PHALCON_CALL_USER_FUNC(instance, service);
53037-
}
53038-
} else {
53039-
ZVAL_BOOL(found, 0);
53040-
}
53030+
ZVAL_BOOL(found, 0);
5304153031
}
5304253032
} else {
5304353033
if (Z_TYPE_P(service) == IS_OBJECT) {

ext/di.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -218,17 +218,7 @@ PHP_METHOD(Phalcon_DI, _factory){
218218
}
219219
}
220220
} else {
221-
if (phalcon_is_callable(service TSRMLS_CC)) {
222-
if (Z_TYPE_P(parameters) == IS_ARRAY) {
223-
PHALCON_INIT_NVAR(instance);
224-
PHALCON_CALL_USER_FUNC_ARRAY(instance, service, parameters);
225-
} else {
226-
PHALCON_INIT_NVAR(instance);
227-
PHALCON_CALL_USER_FUNC(instance, service);
228-
}
229-
} else {
230-
ZVAL_BOOL(found, 0);
231-
}
221+
ZVAL_BOOL(found, 0);
232222
}
233223
} else {
234224
if (Z_TYPE_P(service) == IS_OBJECT) {

0 commit comments

Comments
 (0)