Commit 7103d64c authored by Robert Ricci's avatar Robert Ricci

Fix a bug with adding/subtracting from node numbers - the php

is_string() function returns true for numeric strings. I guess this
makes some sense, but it wasn't what I was expecting.
parent 40034b8c
......@@ -202,10 +202,10 @@ if ($newprefix || $addnumber) {
$prefix = $matches[1];
$number = $matches[2];
if ($addnumber) {
if (is_string($number)) {
$number = chr(ord($number) + $addnumber);
} else {
if (is_numeric($number)) {
$number = $number + $addnumber;
} else {
$number = chr(ord($number) + $addnumber);
}
}
if ($newprefix) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment