I have got a couple of warnings which I assume is due to upgrading to php5.4

Undefined offset: 301 in weblinks_checker_cron()
 (line 342 of /modules/weblinks/contribs/weblinks_checker/weblinks_checker.module).
Undefined property: stdClass::$error in weblinks_checker_cron()
 (line 344 of /modules/weblinks/contribs/weblinks_checker/weblinks_checker.module)

These are fixed by using isset() and this has already been done in 7.x weblinks_checker, so this is only needed for 6.x

Comments

jonathan1055’s picture

Status: Active » Needs review
StatusFileSize
new999 bytes

Here's a patch against 6.x-2.5+18. Fixed identically to how it is done in 7.x

gstegemann’s picture

Jonathan,

I will test your patch. But it should work as in 7.x.

One other thing. When fixing this issue we can also fix the following notice as well:

Notice: Undefined variable: theme in weblinks_blocks_cron() (line 61 of /var/www/html/cm/sites/all/modules/weblinks/contribs/weblinks_blocks/weblinks_blocks.module).

The patch would be very simple: just adding the global variable '$theme' at the beginning of function 'weblinks_blocks_cron'.

Or do you want to have an extra issue created therefore?

Gerhard

jonathan1055’s picture

Given that it is in a different 'contrib' module, best keep it in a separate patch, and hence separate issue, I think. Makes more work to re-roll the patch above ;-)

gstegemann’s picture

Status: Needs review » Reviewed & tested by the community

OK, I will create a separate issue for the weblinks_block_cron notice issue.

Second, I have tested your patch. If fixes the described warnings and can be committed from my point of view.

  • jonathan1055 committed 3f77dd4 on 6.x-2.x
    Issue #2375865 by jonathan1055: Avoid php5.4 warnings...
jonathan1055’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for testing. Fixed.

Status: Fixed » Closed (fixed)

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

Status: Closed (fixed) » Needs work

The last submitted patch, 1: 2375865_1.php5_undefined_warnings_checker.patch, failed testing.

jonathan1055’s picture

Status: Needs work » Fixed

The issue is fixed. Old patch from #1 got automatically requeued for some reason (now that 6.x testing is operational), and obviously it fails to apply because the code change is already committed in #5.

Status: Fixed » Closed (fixed)

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