test #1:
enter an invalid command for the shell. e.g. "asdf" then click execute.
expected result:
You get some type of result about invalid command.
Actual result: nothing shows up. You have no idea if your command worked or not.
fixed result: When doing an exec include errors in the response: 2>&1
Test #2:
Enter something invalid in the switch command. e.g. "asdf". Click Execute. Change to SQL. Enter something valid e.g. "select * from v_users;" Click execute.
Expected result:
You see the SQL output right below your "select * from v_users;" input text box.
Actual result:
Because the output from the previous switch/php/shell is not hidden the SQL output is pushed down off the screen. Unless the user scrolls down they will not see the result and think their SQL command didn't actually work.
Fixed results:
When you do switch/phps/shell show the Response section.
When you do sql hide the response section.
This way only the relevant response/sql_response is shown to avoid confusion/screen clutter.
Please do further testing/review and give comments and suggest cleanup, etc.
This bug is only tripped if all of the following are true:
a) fax send fails
b) email notification of fax failure also fails
c) Other?
how to test
- have a 100% working fax to email setup.
- Change Advanced->defaults->email and set the port to be something invalid.
- e.g. smtp port 9999 is invalid
- send a test fax to something without a fax
- e.g. I just faxed my own DID which does NOT have fax answering
- each time the phone rings answer...wait 5 seconds, and then hang up
- note: it will retry sending the fax 5 times so repeat the above.
- on the last try it will give up, and try to send the failure email
- the email will fail (bad port) and then it will insert the failed email into v_emails
- the insert will fail and nothing in v_emails
Error was caused by trying to insert '' into the domain_uuid field.
'' is invalid in a uuid field, but null is okay.
The null is caused by no x-headers being passed. So these two fields end up null:
$headers["X-FusionPBX-Domain-UUID"]
$headers["X-FusionPBX-Email-Type"]
Ignoring unset/uninitialized variables hides bugs.
Fix: feed the X-Header in the calling lua code.