Skip to content

Commit 8789ef4

Browse files
committed
Merge pull request #60
2 parents 8087ab6 + 3051d3b commit 8789ef4

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ if test "$MONGODB" != "no"; then
109109
PHP_CHECK_GCC_ARG(-Wempty-body, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wempty-body")
110110
PHP_CHECK_GCC_ARG(-Wparentheses, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wparentheses")
111111
PHP_CHECK_GCC_ARG(-Wdeclaration-after-statement, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wdeclaration-after-statement")
112-
PHP_CHECK_GCC_ARG(-Werror, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Werror")
112+
dnl PHP_CHECK_GCC_ARG(-Werror, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Werror")
113113

114114

115115
MAINTAINER_CFLAGS="-Wextra $_MAINTAINER_CFLAGS -Wno-unused-parameter -Wno-unused-but-set-variable -Wno-missing-field-initializers"

src/bson.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,6 @@ bool php_phongo_bson_visit_binary(const bson_iter_t *iter ARG_UNUSED, const char
212212

213213
if (v_subtype == 0x80 && strcmp(key, PHONGO_ODM_FIELD_NAME) ==0) {
214214
((php_phongo_bson_state *)data)->odm = zend_fetch_class((char *)v_binary, v_binary_len, ZEND_FETCH_CLASS_AUTO|ZEND_FETCH_CLASS_SILENT TSRMLS_CC);
215-
if (((php_phongo_bson_state *)data)->odm) {
216-
return false;
217-
}
218-
/* Couldn't resolve the classname, resolve the type as binary */
219215
}
220216

221217
MAKE_STD_ZVAL(zchild);

tests/bson/bson-encode-003.phpt

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ object(stdClass)#%d (1) {
5757
["stuff"]=>
5858
object(MyClass)#%d (1) {
5959
["props"]=>
60-
array(2) {
60+
array(3) {
61+
["__pclass"]=>
62+
object(%sBSON\Binary)#%d (0) {
63+
}
6164
["random"]=>
6265
string(5) "class"
6366
[0]=>
@@ -74,7 +77,10 @@ object(stdClass)#%d (1) {
7477
["stuff"]=>
7578
object(MyClass2)#%d (1) {
7679
["props"]=>
77-
array(3) {
80+
array(4) {
81+
["__pclass"]=>
82+
object(%sBSON\Binary)#%d (0) {
83+
}
7884
[0]=>
7985
int(1)
8086
[1]=>
@@ -100,7 +106,10 @@ object(stdClass)#%d (1) {
100106
[0]=>
101107
object(MyClass)#%d (1) {
102108
["props"]=>
103-
array(2) {
109+
array(3) {
110+
["__pclass"]=>
111+
object(%sBSON\Binary)#%d (0) {
112+
}
104113
["random"]=>
105114
string(5) "class"
106115
[0]=>
@@ -110,7 +119,10 @@ object(stdClass)#%d (1) {
110119
[1]=>
111120
object(MyClass2)#%d (1) {
112121
["props"]=>
113-
array(3) {
122+
array(4) {
123+
["__pclass"]=>
124+
object(%sBSON\Binary)#%d (0) {
125+
}
114126
[0]=>
115127
int(1)
116128
[1]=>

0 commit comments

Comments
 (0)