Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#5037 closed defect (bug) (fixed)

WordPress 2.3 doesn't finish to load when fsockopen has been disabled

Reported by: xknown's profile xknown Owned by:
Milestone: 2.3 Priority: normal
Severity: normal Version: 2.3
Component: General Keywords: has-patch
Focuses: Cc:

Description

As the title states, WP enters in an infinite loop (line 35 wp-includes/update.php) when fsockopen is listed in disable_functions directive.

The attached patch contains an alternative to fix the problem, it also restrict update checks only when is_admin() is true.

Attachments (2)

update_checks.diff (1.0 KB) - added by xknown 17 years ago.
check if fsockopen has been disabled
5037.002.diff (1.7 KB) - added by markjaquith 17 years ago.

Download all attachments as: .zip

Change History (6)

@xknown
17 years ago

check if fsockopen has been disabled

#1 @Nazgul
17 years ago

  • Keywords has-patch added

#2 @markjaquith
17 years ago

Agree that we should be preventing an infinite loop -- but not that we should limit it to wp-admin. It's really close to release, let's just fix the bug.

Checking fsockopen() is good, but line 33 also troubles me because all it tests for is "false" (which obviously is failing in the case of fsockopen() being blocked). We should be testing $fs with is_resource()

#3 @xknown
17 years ago

Mark, your patch is more consistent although I don't like the idea that versions checks take place on init hook.

#4 @markjaquith
17 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [6151]) Core and plugin update checking: make sure fsockopen() is available and check file resources with is_resource() -- both to prevent feof() infinite loops. Props xknown. fixes #5037

Note: See TracTickets for help on using tickets.