Hi,

when running any operation with 'Drush', a number of "undefined constant" PHP errors become visible:


Use of undefined constant OPENLIBRARY_RESTFUL_API_ROOT - assumed 'OPENLIBRARY_RESTFUL_API_ROOT' in include_once() (line 26 of
/var/www/drupal/sites/all/modules/openlibrary/openlibrary.module).
WD php: Notice: Use of undefined constant OPENLIBRARY_COVERS_API_ROOT - assumed 'OPENLIBRARY_COVERS_API_ROOT' in include_once() (line 27 of
/var/www/drupal/sites/all/modules/openlibrary/openlibrary.module).
WD php: Notice: Use of undefined constant OPENLIBRARY_CACHE_PERIOD - assumed 'OPENLIBRARY_CACHE_PERIOD' in include_once() (line 28 of
/var/www/drupal/sites/all/modules/openlibrary/openlibrary.module).
WD php: Notice: Use of undefined constant OPENLIBRARY_COVERS_FILE_PATH - assumed 'OPENLIBRARY_COVERS_FILE_PATH' in include_once() (line 29 of
/var/www/drupal/sites/all/modules/openlibrary/openlibrary.module).

These PHP errors are logges in Drupal's watchdog log as well with severity "error", so they probably indicate an issue that should be fixed.

Any ideas?

Thanks!

Comments

doublejosh’s picture

Dealing with this same problem as I port my module to 7. Not sure why this is a new problem.
How silly, just need to wrap my constant name in quotes. Guess D6 suppressed the issue or something.

http://drupal.org/node/1103076#comment-4284122

asb’s picture

Not sure what "your" module is. Regarding 'Open Library API', could you roll a patch against 6.x-1.x-dev?

Thank you!

doublejosh’s picture

Just cross posting info as I had to deal with this too.

Had to change define('LIBRARY_PATH', 'sites/all/libraries'); to define('LIBRARY_PATH', 'sites/all/libraries'); to fix in within the module I maintain.