Mantis - Resin
Viewing Issue Advanced Details
6059 minor always 05-25-17 11:18 06-05-17 14:58
kpokrovsky  
ferg  
normal  
closed 4.0.52  
fixed  
none    
none 4.0.53  
0006059: PHP is not reloaded after modification
Related to http://bugs.caucho.com/view.php?id=6042. [^] Says that has been fixed, but for PHP problem still exists. Actual for Pro version only. I've finally investigated it myself:

There was a change in QuercusContext::preload method

in 4.0.47:

return gen.preload(className);

in 4.0.52:

// preload only looks inside work dir, QuercusCompiler needs the full classpath
//return gen.preload(className);
    
return gen.load(className);

The difference between JavaClassGenerator::load and JavaClassGenerator::preload is only in one string:

Class<?> cl = loadClass(fullClassName, preload: false);
vs
Class<?> cl = loadClass(fullClassName, preload: true);

Yes, preload variable in JavaClassGenerator::loadClass method controls classloader, but it also controls that code:

if (! preload)
  return cl;

if (isModified(cl)) {
  return null;
}

Which means that modification is not checked anymore and existing PHP page class always gets preloaded whenever any modification actually happened or not.

There are no notes attached to this issue.