[wp-trac] Re: [WordPress Trac] #5090: maybe_create_table call to
config.php issue
WordPress Trac
wp-trac at lists.automattic.com
Thu Oct 25 08:47:12 GMT 2007
#5090: maybe_create_table call to config.php issue
----------------------------+-----------------------------------------------
Reporter: mattyrob | Owner: anonymous
Type: defect | Status: new
Priority: high | Milestone: 2.3.1
Component: Administration | Version: 2.3
Severity: normal | Resolution:
Keywords: has-patch |
----------------------------+-----------------------------------------------
Comment (by mattyrob):
Replying to [comment:9 westi]:
> So your plugin file is being called directly rather than in a WordPress
page load?
>
> The attached patch can't work if you haven't already got ABSPATH defined
and that is __normally__ defined in wp-config.php - ideally we should say
that including install-helper.php requires you to have already pulled in
wp-config.php and then we could remove the require_once at the top and
resolve this issue that way.
My plugin (Subscribe2) has changed over time and I've added a colum to the
table created. To make sure this doesn't cause problems when users upgrade
I have an upgrade function added to the shutdown hook. This upgrade
function needs to use maybe_create_table and maybe_add_column. That is how
the call is made.
The patch does work - I've tested it! However, if wp-config.php is not
really required by install-helper.php then removing it should also fix my
issue.
--
Ticket URL: <http://trac.wordpress.org/ticket/5090#comment:10>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list