@@ -196,7 +196,7 @@ static zend_string *_get_parent_class_name(zend_class_entry *ce)
196
196
static zend_string * _resolve_parent_and_self (const zend_function * fe , zend_string * name )
197
197
{ /* {{{ */
198
198
zend_class_entry * ce = fe -> common .scope ;
199
- /* if there isn't a class then we shouldn't be resolving parent and self */
199
+ /* If there isn't a class then we shouldn't be resolving parent and self. */
200
200
ZEND_ASSERT (ce );
201
201
202
202
switch (zend_get_class_fetch_type (name )) {
@@ -212,18 +212,18 @@ static zend_string *_resolve_parent_and_self(const zend_function *fe, zend_strin
212
212
break ;
213
213
214
214
case ZEND_FETCH_CLASS_DEFAULT :
215
- /* already resolved */
215
+ /* Already resolved. */
216
216
break ;
217
217
218
218
case ZEND_FETCH_CLASS_STATIC :
219
- /* This currently a syntax error */
219
+ /* This is currently a syntax error. */
220
220
ZEND_ASSERT (0 );
221
221
break ;
222
222
223
223
EMPTY_SWITCH_DEFAULT_CASE ();
224
224
}
225
225
226
- return zend_string_copy ( name ) ;
226
+ return name ;
227
227
} /* }}} */
228
228
229
229
static zend_bool class_visible (zend_class_entry * ce ) {
@@ -285,7 +285,6 @@ static inheritance_status _check_covariance(
285
285
zend_string * proto_class_name =
286
286
_resolve_parent_and_self (proto , ZEND_TYPE_NAME (proto_type ));
287
287
if (!proto_class_name ) {
288
- zend_string_free (fe_class_name );
289
288
return INHERITANCE_UNRESOLVED ;
290
289
}
291
290
@@ -308,7 +307,6 @@ static inheritance_status _check_covariance(
308
307
code = INHERITANCE_ERROR ;
309
308
}
310
309
}
311
- zend_string_release (proto_class_name );
312
310
} else if (proto_type_code == IS_ITERABLE ) {
313
311
zend_class_entry * fe_ce = lookup_class (fe_class_name );
314
312
if (fe_ce ) {
@@ -325,7 +323,6 @@ static inheritance_status _check_covariance(
325
323
code = INHERITANCE_ERROR ;
326
324
}
327
325
328
- zend_string_release (fe_class_name );
329
326
return code ;
330
327
} else if (ZEND_TYPE_IS_CLASS (proto_type )) {
331
328
return INHERITANCE_ERROR ;
0 commit comments