Lots of errors regarding 'undefined property'

pobster - August 18, 2009 - 15:50
Project:CVS deploy
Version:7.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:dww
Status:closed
Description

As per title, the latest dev version of D7 brings lots of errors with cvs_deploy e.g.

otice: Undefined property: stdClass::$filepath in cvs_deploy_get_project_name() (line 141 of /Library/WebServer/Documents/drupal-head/sites/all/modules/cvs_deploy/cvs_deploy.module).

Pobster

AttachmentSize
cvs_deploy-1.patch757 bytes

#1

dww - August 18, 2009 - 17:57
Status:active» needs work

Thanks for the report. However, probably D7's file handling changed, and the data structure we're inspecting doesn't work like it used to. Just ignoring it if it's not where we think it is won't help us here. It might prevent the PHP notices, but it's going to break the module. We need to see how this data currently works in D7 and use it appropriately...

#2

pobster - August 19, 2009 - 09:52

Yup, that is a good point - I suppose it is a bit early to be making assumptions about whether the file handling change is permanent or otherwise. Still at least the patch will cover up the messages in the meantime - and the module does seem to still work for me in the areas I use it in (drush and version numbers on the admin/build/modules page).

Thanks for the work,

Pobster

#3

dww - August 19, 2009 - 15:32

This module is tiny and "chasing HEAD" as much as possible so it can be used by folks developing and testing D7. Even if the file handling changes again, it'd be worth figuring out how the file handling currently works and fix this accordingly. It really shouldn't be hard at all if you turn on devel.module and throw in a dvm($file); in that function and see what's what.

#4

dww - August 21, 2009 - 05:31
Assigned to:Anonymous» dww
Status:needs work» needs review

Like so. ;)

AttachmentSize
552506-4.cvs_deploy_d7_file_api.patch 701 bytes

#5

pobster - August 21, 2009 - 05:59

Heh, beautiful! I have to confess when you said the magic words "chasing HEAD" I did think to myself that you're probably right - it'll change next week, so I didn't bother looking into it yet.

Thanks, and thanks for the module - I use it on all of my Drupal environments,

Pobster
edit: and yep, patch works just fine for me

#6

dww - August 21, 2009 - 06:04

Actually, that patch wasn't complete... This should be even better.

AttachmentSize
552506-6.cvs_deploy_d7_file_api.patch 1.57 KB

#7

dww - August 21, 2009 - 06:08

FYI: Looks like this was broken by #517814: File API Stream Wrapper Conversion.

#8

dww - August 21, 2009 - 21:04
Status:needs review» fixed

In my testing, this works. Committed to HEAD.

#9

pobster - August 21, 2009 - 21:56

Aye, yep I've tested it extensively today and it looks good to me too.

Thanks,

Pobster

#10

System Message - September 4, 2009 - 22:00
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.