# Using uninitialized variable value

**URL:** <https://www.ruby-forum.com/t/using-uninitialized-variable-value/243634>\
**Category:** NGINX\
**Created:** [December 14, 2015, 12:32am UTC](https://www.ruby-forum.com/t/using-uninitialized-variable-value/243634 "2015-12-14T00:32:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [December 14, 2015, 12:32am UTC](https://www.ruby-forum.com/t/using-uninitialized-variable-value/243634/1 "2015-12-14T00:32:03Z")

</div>

Hi,

we are getting quite a lot of these warnings about using uninitialized  
variables, although we have “set” directive for each variable in every  
server block. I understand the fact, that it happens when the request is  
not valid and the rewrite module handler does not run, but this also  
happens on valid requests (valid headers, valid request line, correctly  
detected & set server block, …) AND we are unable to reproduce it.  
Issuing the same request with the same headers to the same instance of  
nginx is unfortunately not enough to regenerate the warning.

Does anybody have some examples of situations in which the rewrite  
handler will not run therefore these variables will seem as  
uninitialized? Or can you point me to what additional info I can  
provide?

FYI: I know I can mute the warnings, but when the variables are  
uninitialized and they are used in the “if=“ of “access\_log” directive  
it then does not work as it should 😕

Regards,  
Tomas Kvasnicka
