Skip to content

Commit 593e603

Browse files
author
Andi Gutmans
committed
- Make gettype() behave like it used to where it returned "object" for
objects.
1 parent 1e2474b commit 593e603

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ext/standard/basic_functions.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -1273,7 +1273,11 @@ void php3_gettype(INTERNAL_FUNCTION_PARAMETERS)
12731273
case IS_ARRAY:
12741274
RETVAL_STRING("array",1);
12751275
break;
1276-
case IS_OBJECT: {
1276+
case IS_OBJECT:
1277+
RETVAL_STRING("object",1);
1278+
break;
1279+
/*
1280+
{
12771281
char *result;
12781282
int res_len;
12791283
@@ -1282,6 +1286,7 @@ void php3_gettype(INTERNAL_FUNCTION_PARAMETERS)
12821286
sprintf(result, "object of type %s", arg->value.obj.ce->name);
12831287
RETVAL_STRINGL(result, res_len, 0);
12841288
}
1289+
*/
12851290
break;
12861291
default:
12871292
RETVAL_STRING("unknown type",1);

0 commit comments

Comments
 (0)