Ticket #11597: 11597.patch
| File 11597.patch, 3.6 KB (added by , 16 years ago) |
|---|
-
wp-includes/class-simplepie.php
### Eclipse Workspace Patch 1.0 #P wordpress-trunk
764 764 } 765 765 766 766 /** 767 * Remove items that link back to this before destroying this object 767 * destroy all of this objects circular references sothat an unset operation 768 * can free memory. 768 769 */ 769 function __destruct()770 function destroy() 770 771 { 771 772 if ((version_compare(PHP_VERSION, '5.3', '<') || !gc_enabled()) && !ini_get('zend.ze1_compatibility_mode')) 772 773 { 773 if (!empty($this->data['items']))774 foreach ( array('items', 'ordered_items') as $key ) 774 775 { 775 foreach ($this->data['items'] as $item)776 if ( !empty($this->data[$key]) ) 776 777 { 777 $item->__destruct(); 778 foreach( $this->data[$key] as $item ) 779 { 780 $item->destroy(); 781 } 778 782 } 779 unset($item, $this->data['items']);780 783 } 781 if (!empty($this->data['ordered_items']))782 {783 foreach ($this->data['ordered_items'] as $item)784 {785 $item->__destruct();786 }787 unset($item, $this->data['ordered_items']);788 }789 784 } 790 785 } 791 786 … … 3123 3118 } 3124 3119 3125 3120 /** 3126 * Remove items that link back to this before destroying this object 3121 * destroy all of this objects circular references sothat an unset operation 3122 * can free memory. 3127 3123 */ 3128 function __destruct()3124 function destroy() 3129 3125 { 3130 3126 if ((version_compare(PHP_VERSION, '5.3', '<') || !gc_enabled()) && !ini_get('zend.ze1_compatibility_mode')) 3131 3127 { -
wp-admin/includes/dashboard.php
636 636 637 637 if ( !$rss->get_item_quantity() ) { 638 638 echo '<p>' . __('This dashboard widget queries <a href="http://blogsearch.google.com/">Google Blog Search</a> so that when another blog links to your site it will show up here. It has found no incoming links… yet. It’s okay — there is no rush.') . "</p>\n"; 639 $rss-> __destruct();639 $rss->destroy(); 640 640 unset($rss); 641 641 return; 642 642 } … … 691 691 } 692 692 693 693 echo "</ul>\n"; 694 $rss-> __destruct();694 $rss->destroy(); 695 695 unset($rss); 696 696 } 697 697 … … 748 748 echo '</p></div>'; 749 749 } 750 750 } elseif ( !$rss->get_item_quantity() ) { 751 $rss-> __destruct();751 $rss->destroy(); 752 752 unset($rss); 753 753 return false; 754 754 } else { 755 755 echo '<div class="rss-widget">'; 756 756 wp_widget_rss_output( $rss, $widgets['dashboard_secondary'] ); 757 757 echo '</div>'; 758 $rss-> __destruct();758 $rss->destroy(); 759 759 unset($rss); 760 760 } 761 761 } … … 769 769 * 770 770 * @since unknown 771 771 */ 772 function wp_dashboard_plugins_output() { 772 function wp_dashboard_plugins_output() { 773 773 $popular = fetch_feed( 'http://wordpress.org/extend/plugins/rss/browse/popular/' ); 774 774 $new = fetch_feed( 'http://wordpress.org/extend/plugins/rss/browse/new/' ); 775 775 $updated = fetch_feed( 'http://wordpress.org/extend/plugins/rss/browse/updated/' ); … … 840 840 echo "<h5><a href='$link'>$title</a></h5> <span>(<a href='$ilink' class='thickbox' title='$title'>" . __( 'Install' ) . "</a>)</span>\n"; 841 841 echo "<p>$description</p>\n"; 842 842 843 $$feed-> __destruct();843 $$feed->destroy(); 844 844 unset($$feed); 845 845 } 846 846 } … … 939 939 $widget_options[$widget_id]['title'] = htmlentities(__('Unknown Feed')); 940 940 } else { 941 941 $widget_options[$widget_id]['title'] = htmlentities(strip_tags($rss->get_title())); 942 $rss-> __destruct();942 $rss->destroy(); 943 943 unset($rss); 944 944 } 945 945 }