|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchesrefact_if (last revision 2010-09-18 01:27 UTC by cataphract@php.net)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-09-18 03:27 UTC] cataphract@php.net
[2010-09-18 03:31 UTC] cataphract@php.net
[2018-03-10 14:29 UTC] cmb@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: cmb
[2018-03-10 14:29 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 08:00:02 2025 UTC |
Description: ------------ Two if conditions (one in zend_std_read_property and another in zend_std_write_property) are very confusing and should be refactored. Here's one: 493 if (EXPECTED(property_info != NULL) && 494 ((EXPECTED((property_info->flags & ZEND_ACC_STATIC) == 0) && 495 property_info->offset >= 0) ? 496 (zobj->properties ? 497 ((variable_ptr = (zval**)zobj->properties_table[property_info->offset]) != NULL) : 498 (*(variable_ptr = &zobj->properties_table[property_info->offset]) != NULL)) : 499 (EXPECTED(zobj->properties != NULL) && 500 EXPECTED(zend_hash_quick_find(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, (void **) &variable_ptr) == SUCCESS)))) { 501 /* if we already have this value there, we don't actually need to do anything */ This is very non-obvious. I've refactored the conditions, which I tested with no regressions in the tests.