Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The problem is type conversion in PHP (as usual) in the following method of Nodejs service:
public function safeNodeServerVersion() {
if ($this->nodeServerVersion === NULL) {
$this->healthCheck();
}
return $this->nodeServerVersion && $this->nodeServerVersion >= self::SAFE_NODE_SERVER_VERSION;
}
As you see it just compares two strings and while the patch version was one-digit everything was fine. But with 1.0.10 it returns FALSE while it should return TRUE.
Comment | File | Size | Author |
---|---|---|---|
#2 | nodejs-2854574-version_comparison-2.patch | 774 bytes | Angerslave |
Comments
Comment #2
Angerslave CreditAttribution: Angerslave at Cold Brain commentedIn general 7.x branch approach looks fine (using version_compare() is better than blind string comparison), so I just took it and made it a little more compact.
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedthanks, pushed to 8.x.