Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#13437 closed defect (bug) (worksforme)

Segfault in function admin_url when not using casting (string) — at Version 2

Reported by: dz0ny Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: Multisite Keywords: has-patch reporter-feedback
Focuses: Cc:

Description (last modified by nacin)


there is unresolved bug with php 5.2.x(see http://bugs.php.net/bug.php?id=47522), which causes segfault in all distributions and with multiple frameworks(Zend, qubit-toolkit...), the solution so far is to cast return value as string.

Solution is: in wp-includes/link-template.php

function admin_url( $path = '', $scheme = 'admin' ) {
	return (string)get_admin_url(null, $path, $scheme);

Change History (2)

#1 @dz0ny
8 years ago

  • Milestone changed from Unassigned to 3.0
  • Resolution set to worksforme
  • Severity changed from normal to major
  • Status changed from new to closed

#2 @nacin
8 years ago

  • Description modified (diff)

get_admin_url() should never return anything but a string that I know of. If it did, no WordPress objects have a toString() method and thus this bug does not apply.

I have edited out your phpinfo.php link. I would delete that file immediately.

Note: See TracTickets for help on using tickets.