This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | |||
4 | /** |
||
5 | * Shortcode: Announcement Slider |
||
6 | */ |
||
7 | // function announcement_slider($atts, $content = null){ |
||
8 | |||
9 | // ob_start(); |
||
10 | |||
11 | // echo '<div class="messages"> <div id="announcement_slider" class="owl-carousel">'; |
||
12 | |||
13 | // if( have_rows('announcement', 'option') ): |
||
14 | // while ( have_rows('announcement', 'option') ) : the_row(); |
||
15 | // $message = get_sub_field('messages'); |
||
16 | // $message_link = get_sub_field('link'); |
||
17 | |||
18 | // echo '<div class="col-xs-12">'; |
||
19 | // echo '<a href=" ' . $message_link .' " " title="Click to read full messages"> ' . $message .' </a>'; |
||
20 | // echo '</div>'; |
||
21 | // endwhile; |
||
22 | // else : |
||
23 | // echo '<div class="col-xs-12">No Messages to Show!</div>'; |
||
24 | // endif; |
||
25 | // echo '</div></div>'; |
||
26 | |||
27 | // $output = ob_get_clean(); |
||
28 | // return $output; |
||
29 | // } |
||
30 | |||
31 | // add_shortcode('announcement','announcement_slider'); |
||
32 | |||
33 | function announcement_slider($atts, $content = null){ |
||
0 ignored issues
–
show
|
|||
34 | |||
35 | ob_start(); |
||
36 | |||
37 | echo '<div class="marquee-container"> |
||
38 | <div class="marquee">'; |
||
39 | if( have_rows('announcement', 'option') ): |
||
0 ignored issues
–
show
'option' is of type string , but the function expects a boolean .
It seems like the type of the argument is not accepted by the function/method which you are calling. In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug. We suggest to add an explicit type cast like in the following example: function acceptsInteger($int) { }
$x = '123'; // string "123"
// Instead of
acceptsInteger($x);
// we recommend to use
acceptsInteger((integer) $x);
![]() |
|||
40 | while ( have_rows('announcement', 'option') ) : the_row(); |
||
0 ignored issues
–
show
'option' is of type string , but the function expects a boolean .
It seems like the type of the argument is not accepted by the function/method which you are calling. In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug. We suggest to add an explicit type cast like in the following example: function acceptsInteger($int) { }
$x = '123'; // string "123"
// Instead of
acceptsInteger($x);
// we recommend to use
acceptsInteger((integer) $x);
![]() |
|||
41 | $message = get_sub_field('messages'); |
||
42 | $message_link = get_sub_field('link'); |
||
43 | |||
44 | echo '<a href=" ' . $message_link .' " " title="Click to read full message"> ' . $message .' </a> <span>-</span>'; |
||
45 | endwhile; |
||
46 | else : |
||
47 | echo '<div class="col-xs-12">No Messages to Show!</div>'; |
||
48 | endif; |
||
49 | echo '</div></div>'; |
||
50 | |||
51 | $output = ob_get_clean(); |
||
52 | return $output; |
||
53 | } |
||
54 | |||
55 | add_shortcode('announcement','announcement_slider'); |
||
56 | |||
57 | |||
58 | /** |
||
59 | * Shortcode: Recent Post Slider |
||
60 | */ |
||
61 | function recent_post_slider($atts, $content = null){ |
||
0 ignored issues
–
show
|
|||
62 | |||
63 | ob_start(); |
||
64 | |||
65 | echo '<div class="post-slider row"><div id="recent-posts" class="owl-carousel">'; |
||
66 | |||
67 | global $post; |
||
68 | $post_query = new WP_Query( array( |
||
69 | 'post_type' => 'post', |
||
70 | 'posts_per_page' => 12, |
||
71 | 'order'=>'DESC', |
||
72 | 'orderby' => 'date', |
||
73 | ) |
||
74 | ); |
||
75 | |||
76 | if( $post_query->have_posts() ) : while( $post_query->have_posts() ) : $post_query->the_post(); |
||
77 | $thumb_post = wp_get_attachment_image_src( get_post_thumbnail_id(), 'lighthouse_related_post'); |
||
78 | $url_post = $thumb_post[0]; |
||
79 | $content = get_the_content(); |
||
80 | |||
81 | echo '<div class="col-xs-12"><div class="thumbnail thumbnail-hover">'; |
||
82 | echo '<img class="img-responsive" src=" ' . $url_post . '">'; |
||
83 | echo '<a href=" ' . get_permalink() .' " " title=" ' . get_the_title() .' " class="overlay"></a>'; |
||
84 | echo '</div>'; |
||
85 | echo '<div class="entry">'; |
||
86 | echo '<h3><a href=" ' . get_permalink() . ' "> ' . get_the_title() . '</a></h3>'; |
||
87 | echo '<span class="date"> <i class="fa fa-clock-o"></i> ' . get_the_time(get_option('date_format')) .'</span>'; |
||
88 | echo '<div class="entry-content">' . wp_trim_words( $content , '27' ) . '</div>'; |
||
89 | echo '<div class="read-more">'; |
||
90 | echo '<a href="' . get_permalink() . ' " class="btn read-more-btn">View Article</a>'; |
||
91 | echo '</div>'; |
||
92 | echo '</div></div>'; |
||
93 | |||
94 | endwhile; |
||
95 | wp_reset_postdata(); |
||
96 | endif; |
||
97 | |||
98 | echo '</div></div>'; |
||
99 | |||
100 | $output = ob_get_clean(); |
||
101 | return $output; |
||
102 | } |
||
103 | |||
104 | add_shortcode('recent_posts','recent_post_slider'); |
||
105 | |||
106 | |||
107 | /** |
||
108 | * Shortcode: Member logo slider |
||
109 | */ |
||
110 | function member_logo_slider($atts, $content = null){ |
||
0 ignored issues
–
show
|
|||
111 | |||
112 | ob_start(); |
||
113 | |||
114 | echo '<div class="members-logo row"> <div id="logo-slider" class="owl-carousel">'; |
||
115 | |||
116 | if( have_rows('members_logo', 'option') ): |
||
0 ignored issues
–
show
'option' is of type string , but the function expects a boolean .
It seems like the type of the argument is not accepted by the function/method which you are calling. In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug. We suggest to add an explicit type cast like in the following example: function acceptsInteger($int) { }
$x = '123'; // string "123"
// Instead of
acceptsInteger($x);
// we recommend to use
acceptsInteger((integer) $x);
![]() |
|||
117 | while ( have_rows('members_logo', 'option') ) : the_row(); |
||
0 ignored issues
–
show
'option' is of type string , but the function expects a boolean .
It seems like the type of the argument is not accepted by the function/method which you are calling. In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug. We suggest to add an explicit type cast like in the following example: function acceptsInteger($int) { }
$x = '123'; // string "123"
// Instead of
acceptsInteger($x);
// we recommend to use
acceptsInteger((integer) $x);
![]() |
|||
118 | $logo_url = get_sub_field('logo'); |
||
119 | $company_link = get_sub_field('link'); |
||
120 | |||
121 | echo '<div class="thumbnail thumbnail-hover">'; |
||
122 | echo '<img class="img-responsive" src=" ' . $logo_url . '">'; |
||
123 | echo '<a href=" ' . $company_link .' " " title=" ' . $company_link .' " class="link-full"></a>'; |
||
124 | echo '</div>'; |
||
125 | |||
126 | endwhile; |
||
127 | else : |
||
128 | echo '<div class="col-xs-12">Members Logo Slider not found! <be> please add some logo in theme setting page</div>'; |
||
129 | endif; |
||
130 | echo '</div></div>'; |
||
131 | |||
132 | $output = ob_get_clean(); |
||
133 | return $output; |
||
134 | } |
||
135 | |||
136 | add_shortcode('members_logo','member_logo_slider'); |
||
137 | |||
138 | |||
139 | /** |
||
140 | * Shortcode: Share Price |
||
141 | */ |
||
142 | function share_price_feed($atts, $content = null){ |
||
0 ignored issues
–
show
|
|||
143 | |||
144 | ob_start(); |
||
145 | |||
146 | $xmldat = file_get_contents('http://qfx.quartalflife.com/clients/uk/lighthouse_group/xml/xml.aspx'); |
||
147 | file_put_contents('./wp-content/themes/lighthouse/xml-feeds/share-price.xml', $xmldat); |
||
148 | |||
149 | $url = './wp-content/themes/lighthouse/xml-feeds/share-price.xml'; |
||
150 | $xml = simplexml_load_file($url); |
||
151 | $price = $xml->CurrentPrice; |
||
0 ignored issues
–
show
The property
CurrentPrice does not seem to exist in SimpleXMLElement .
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name. If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading. ![]() |
|||
152 | $change = $xml->Change; |
||
0 ignored issues
–
show
The property
Change does not seem to exist in SimpleXMLElement .
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name. If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading. ![]() |
|||
153 | $change_pcent = $xml->PercentageChange; |
||
0 ignored issues
–
show
The property
PercentageChange does not seem to exist in SimpleXMLElement .
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name. If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading. ![]() $change_pcent is not used, you could remove the assignment.
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently. $myVar = 'Value';
$higher = false;
if (rand(1, 6) > 3) {
$higher = true;
} else {
$higher = false;
}
Both the ![]() |
|||
154 | $volume = $xml->Volume; |
||
0 ignored issues
–
show
The property
Volume does not seem to exist in SimpleXMLElement .
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name. If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading. ![]() |
|||
155 | $Date = $xml->Date; |
||
0 ignored issues
–
show
The property
Date does not seem to exist in SimpleXMLElement .
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name. If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading. ![]() |
|||
156 | $time = $xml->time; |
||
0 ignored issues
–
show
The property
time does not seem to exist in SimpleXMLElement .
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name. If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading. ![]() |
|||
157 | |||
158 | echo '<div class="share_price_feed">'; |
||
159 | |||
160 | echo '<div class="feed_options"><div class="share_data_title">Share Price:</div><div class="share_data">' . $price . '</div></div>'; |
||
161 | echo '<div class="feed_options"><div class="share_data_title">Change:</div><div class="share_data">' . $change . 'p</div></div>'; |
||
162 | echo '<div class="feed_options"><div class="share_data_title">Volume:</div><div class="share_data">' . $volume . '</div></div>'; |
||
163 | echo '<div class="feed_options"><div class="share_data_title">Date:</div><div class="share_data">' . $Date . '</div></div>'; |
||
164 | echo '<div class="feed_options"><div class="share_data_title">Time:</div><div class="share_data">' . $time . '</div></div>'; |
||
165 | |||
166 | echo '</div>'; |
||
167 | |||
168 | $output = ob_get_clean(); |
||
169 | return $output; |
||
170 | } |
||
171 | |||
172 | add_shortcode('share_price','share_price_feed'); |
||
173 | |||
174 | |||
175 | |||
176 | /** |
||
177 | * Shortcode: RNS Feeds |
||
178 | */ |
||
179 | function rns_feed_fn($atts, $content = null){ |
||
0 ignored issues
–
show
|
|||
180 | |||
181 | ob_start(); |
||
182 | |||
183 | $xmldata = file_get_contents('http://otp.investis.com/clients/uk/lighthouse_group_plc/rns/xml-feed.aspx?culture=en-GB'); |
||
184 | file_put_contents('./wp-content/themes/lighthouse/xml-feeds/rns-feed.xml', $xmldata); |
||
185 | |||
186 | $url = './wp-content/themes/lighthouse/xml-feeds/rns-feed.xml'; |
||
187 | $xml = simplexml_load_file($url); |
||
188 | |||
189 | foreach ($xml->RNSSummaries->RNSSummary as $RNSSummary) { |
||
190 | $RNSDateTime = $RNSSummary->pubDate; |
||
191 | $RNSDate = substr($RNSDateTime, 5, 11); |
||
192 | $RNSLink = $RNSSummary->ShareURL; |
||
193 | $RNSTitle = $RNSSummary->Title; |
||
194 | |||
195 | echo $RNSDate, ' – <a title="Read article" href=" ', $RNSLink, ' " target="_blank"> ', $RNSTitle, ' </a><br> ', PHP_EOL; |
||
196 | } |
||
197 | |||
198 | $output = ob_get_clean(); |
||
199 | return $output; |
||
200 | } |
||
201 | |||
202 | add_shortcode('rns_feed','rns_feed_fn'); |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.