PHP Warning Messages
Warnings:

Line engine/database/connect.php:
return mysqli_real_escape_string($connect, $escapestr);
Lines register.php:

Could it be the $_POST['username']?
This is weird, is $_POST['username'] an array?
What PHP version are you using?
Are you using a custom layout?
Normally, the $_POST data is validated before getting to this step. https://github.com/Znote/ZnoteAAC/blob/00a97d43e49ae6b3c697f6867e9e03b871fe2334/register.php#L8-L15 I guess I can cast the value to string during this validation as well.
Is this a common occurence (can you reproduce it) or does it only happen once in a while?
PHP Version 5.5.9-1ubuntu4.29
Custom Layout
The $_POST is validated

Does it only happen once in a while