after creation of gallery everything seems ok, but such a message appears:
Strict warning: is_a(): Deprecated. Please use the instanceof operator in FieldsRSIPreventor->__construct() (line 24 of /var/www/.../sites/all/modules/media_gallery/fields_rsi_prevention.inc).

Media 7.x-1.0-rc2
Media Gallery 7.x-1.0-beta7
ColorBox jQuery plugin 1.3.18

CommentFileSizeAuthor
#4 use-instanceof-1322566-4.patch490 bytesMoloc
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

zegmant’s picture

can anyone help?

allhailtheduck’s picture

I changed line 24 from:

<?php
if (is_a($entity, 'FieldRSIPreventor')) {
?>

to

<?php
if ($entity instanceof FieldRSIPreventor) {
?>

and the error message went away.

zegmant’s picture

somethings goes wrong with this patch. the error message disappeared, but i have some utf symbols in the top of the page and broken adminmenu.
i am not familiar to php, just a lamer, sorry)

Moloc’s picture

Status: Active » Needs review
FileSize
490 bytes

Here is a patch, implementing #2.

Just a note:
System Requirements of Drupal 7

PHP: 5.2.5 or higher (5.3 recommended)

Changelog of the "is_a()" function:

PHP 5.3.0 This function is no longer deprecated, and will therefore no longer throw E_STRICT warnings.
PHP 5.0.0 This function became deprecated in favour of the instanceof operator. Calling this function will result in an E_STRICT warning.

lsolesen’s picture

@Moloc What is you opinion on this patch. Should it be implemented or just left out?

Moloc’s picture

Status: Needs review » Fixed

As we need to support the minimal requirements of D7, i commited the patch: http://drupalcode.org/project/media_gallery.git/commit/f10d151870395e755...

Status: Fixed » Closed (fixed)

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