debugWarning(string.format("Inserting '%s' '%s' in table with %d elements, nil is not a valid appending value, inserting false instead to fix behaviour!",key,value,#t))
ifvaluethen
oldInsertFunction(t,false,value)
else
oldInsertFunction(t,false)
end
else
ifvaluethen
oldInsertFunction(t,key,value)
else
oldInsertFunction(t,key)
end
end
end
-- redefine the hardcoded 'pairs' function to use the redefined 'next'
-- redefine the hardcoded 'pairs' function to use the redefined 'next'