Forum

PHP ***** ERROR ***...
 
Notifications
Retirer tout

PHP ***** ERROR ***** cause = is_a(): Deprecated. Please use the instanceof operator

2 Posts
2 Utilisateurs
0 Reactions
3,510 Vu
(@hawkeye)
Posts: 4
Active Member
Début du sujet
 
[#2955]

:blink:
After creating a completely new 5.2.1. environment for testing issues

1) :huh:
on creating almost any new object ticket, activity ...a.s.o. the following PHP error occurs:
2016-01-23 06:37:40.451 ** ERROR ** ERROR **
2016-01-23 06:37:40.452
** ERROR ** on file 'E:developphp_mysql_bspprojeqtor_newmodelpersistenceSqlElement.php' at line (4229)
2016-01-23 06:37:40.453
** ERROR ***** cause = is_a(): Deprecated. Please use the instanceof operator

this error occurs once per to be created object and somehow appears to be is similar to Ticket #1937 by lfrugere !

Changing the operator towards PHP5 compatibility makes the program run much more smoothly:

public static function is_a($object,$class) {
global $hideAutoloadError;
$hideAutoloadError=true; // Avoid error message in autoload
//$result=is_a($object,$class); // is_a classic
$result=($object instanceof $class); // instanceof in PHP5 style makes it run more smoothly
$hideAutoloadError=true;
return $result;
}
2) 😳
language hr is not selectable in the parameter dialogue when creating a completely new 5.2.1. environment

Thank you ! 🙂


 
Posté : 23 Jan AM 08:011
(@babynus)
Posts: 14952
Membre Admin
 

1) is_a is deprecated from php 5.0 to 5.2, but not any more in PHP 5.3
There is a difference between is_a and instanceof as is_a accepts a string and not only an object.
Workaround will be proposed on patch 5.2.2

2) will be fixed in V5.2.2


 
Posté : 24 Jan PM 16:011
Share:
Retour en haut