An error occurred. /batch?id=3&op=do
Fatal error: Call to undefined function _drupal_get_last_caller() in C:\www\webapps\drupal-6\sites\all\modules\simpletest\drupal_web_test_case.php on line 217

Then, proceeding ro the error page:
Fatal error: require_once() [function.require]: Failed opening required '' (include_path='.;C:/www/vhosts/localhost/;C:/www/php5/includes/;sites/all/modules/coder/scripts/coder_format/tests') in C:\www\webapps\drupal-6\sites\all\modules\simpletest\simpletest.pages.inc on line 249

Comments

dave reid’s picture

Did you apply the patch included with the module to Drupal core (as per the install.txt)?

nancydru’s picture

Title: Call to undefined function _drupal_get_last_caller() » Put core patch into core
Category: bug » feature
Priority: Critical » Normal

Thanks, Mr. Reid.

Why can't this patch actually be put into core so we don't have to re-invent the wheel every week when security releases come out?

dave reid’s picture

Title: Put core patch into core » Add latest SimpleTest backport directly to core
Project: SimpleTest » Drupal core
Version: 6.x-2.9 » 6.x-dev
Component: Code » base system
Status: Active » Needs review
StatusFileSize
new14.43 KB

I don't see why it couldn't be put into core. It doesn't change any APIs, it only adds necessary ones for SimpleTest to work. We already have D6. core additions to drupal_http_request() to help SimpleTest. Moving this to the D6 queue for review.

dave reid’s picture

I guess the only problem would be if any of there are any PHP4 incompatibilities that would prevent the files from being parsed. It would need manual testing on PHP 4 to make sure Drupal 6 installs and works as normal without the SimpleTest module enabled.

nancydru’s picture

Well, I don't have PHP4, so I can't check.

dave reid’s picture

StatusFileSize
new22.4 KB

Found a problem with drupal_http_request() and the latest SimpleTest backport. This really needs to land in core or testing in contrib is broken again.

dave reid’s picture

StatusFileSize
new15.01 KB

Had some extra stuff left in the last patch.

boombatower’s picture

Status: Needs review » Reviewed & tested by the community

This patch is what simpletest 6.x-2.x currently contains which is updated the drupal_http_request() user-agent code and optimizes some d6 logic from my original patch.

If this is committed I can remove this rather ugly step from simpletest INSTALL.txt and since we already have backported code for drupal_http_request() I agree it makes sense to: 1) update it, and 2) go the whole way and make it truly work for simpletest.

I support this patch and have already reviewed...since I made the original patch :)

nancydru’s picture

+1 from me. We have to do that ugly patch every time a security update comes out and that's a real bummer; makes me want to stay behind the current releases.

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Needs work

As a matter of fact, I've actually tested a simpletest patched Drupal 6 on PHP 4. I've intended to test a clean D6 but had the simpletest changes applied. Unfortunately this does not work due to at least the instanceof operator being used, where parsing of common.inc halts in PHP 4 (it is only a defined operator from PHP 5).

Please do not be so light-hearted to mark a patch as RTBC even as the PHP 4 concern was raised and then not verified.

dave reid’s picture

Status: Needs work » Needs review
StatusFileSize
new16.96 KB

Revised patch that uses is_a() instead of instanceof

dave reid’s picture

Assigned: Unassigned » dave reid
Status: Needs review » Needs work

Bleh, this patch got messed up. Will work on a fresh one.

nancydru’s picture

Well, I now have an issue with 6.14 in one of my queues, so I guess I am forced to make these changes all over again... (sigh)

dave reid’s picture

We should include hiding modules or themes that have hidden = TRUE set in their .info files as well with this backport.

Chris Johnson’s picture

We have roughly a 100 sites spread across half a dozen customers which could make good use of this patch, so we strongly support it being included in core.

owen barton’s picture

Same here - the easier we can make simpletesting in Drupal 6 the more contrib modules will add tests, which would obviously be better to do before they do their Drupal 7 upgrades than after.

nancydru’s picture

To amplify Owen's assertion, because of the lack of this patch I have stopped working on SimpleTest for my modules because it is just too burdensome to keep applying this patch every time a security release comes out. Basically it comes down to which is more important, security or SimpleTest. I think most people will arrive at the same answer I did.

Personally I think this issue is "critical."

seanburlington’s picture

The patch is causing problems for me on PHP5.1

Lot's of this
Notice: Use of undefined constant E_RECOVERABLE_ERROR - assumed 'E_RECOVERABLE_ERROR' in /var/www/pre-release-01/public_html/includes/common.inc on line 3780

E_RECOVERABLE_ERROR was only introduced in 5.2

http://php.net/manual/en/errorfunc.constants.php

Maybe this can be worked around - but the patch from simpletest 6.10 doesn't work for me (apologies if I've missed something)

see also #673928: SimpleTest 6.x-2.x requires PHP 5.2, but does not require in .info

boombatower’s picture

Re-rolled patch and committed to simpletest 6.x-2.x-dev

boombatower’s picture

StatusFileSize
new15.04 KB
tstoeckler’s picture

It seems this was committed as part of http://drupal.org/cvs?commit=364120. I don't know if that was on purpose though.

nancydru’s picture

Status: Needs work » Fixed

Then it should be marked fixed.

dave reid’s picture

Status: Fixed » Needs work

It shouldn't since it adds a (*ugh*) PHP5 dependency on core. The unintentional commit does have to get rolled back.

boombatower’s picture

http://gophp5.org/ but oh wellz.

nancydru’s picture

@boombatower: I'm with you. If it were up to me, I would go ahead and change 6.x requirements to PHP 5. I think we both know how that would be received.

gábor hojtsy’s picture

@bombatower: unfortunately there are people running Drupal 6 on PHP 4 and reporting critical bugs (rightly so) anytime we add code which does not run on PHP4. We offered PHP 4 support for Drupal 6, so it is how it is. BTW Dries rolled this back with #793196: rollback accidental commit with php5 code for D6, so no need to take any action here.

JimBroad’s picture

This might sound crazy, but is it possible to get this in as a monkey patch? As in:
<?
if(version_compare(PHP_VERSION, 5.2) && module_exists('simpletest')){
simpletest_common_inc_monkey_patch(...);
}
?>

'This would keep the noise in core to a minimum and allow simpletest specifics to be contained in simpletest module.

Not sure how this would work with bootstrap.inc ... but just an idea, trying to figure out a way to keep development and core environments in sync.

klonos’s picture

subscribing...

vivianspencer’s picture

subscribe

ñull’s picture

subscribing

We are months later now. I tried to install simpletest and the presently included patch fails against the present D6.19. Why isn't this progressing?

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.