Getting a couple php notices around the constants defined in apachesolr.module and the constant REQUIREMENT_ERROR.

The notices from apachesolr.module are because quotes arn't used in the define(). PHP examples show you that it should use quotes, but PHP is nice, and assumes you meant to use them.

For REQUIREMENT_ERROR, that is defined in install.inc in both 6 and 7. (http://api.drupal.org/api/constant/REQUIREMENT_ERROR). So you have to include it here to use that constant.

Comments

robertdouglass’s picture

Status: Needs review » Needs work

I applied this to 6.1 and 6.2, thanks. My question as a followup is whether we want to move REQUIREMENT_ERROR into apachesolr.module so that we don't have to include the install file?

robertdouglass’s picture

Crap - used the wrong message in the cvs commits.

Scott Reynolds’s picture

Thats a interesting question. The only place I could think of where both install.inc and apachesolr.module would be include is admin/reports/status.

Do things blow up there?

pwolanin’s picture

Version: 6.x-2.x-dev » 6.x-1.x-dev
Status: Needs work » Needs review
StatusFileSize
new1.46 KB

how about this for 1.x? seems to work fine.

pwolanin’s picture

StatusFileSize
new1.54 KB

oops - didn't see that Robert already applied the 1st part. Applying this patch.

pwolanin’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
Status: Needs review » Patch (to be ported)

remaining fix + CHANGELOG entry to be ported

robertdouglass’s picture

StatusFileSize
new827 bytes

Peter, looks like you missed removing the include. Applying attached to clean up, and then syncing 6.2. to be the same.

pwolanin’s picture

thanks for catching that

claudiu.cristea’s picture

Version: 6.x-2.x-dev » 5.x-2.x-dev
Status: Patch (to be ported) » Fixed

Ported to DRUPAL-5--2 in: #317968 and #317974.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.